Skip to content

[AddressLowering] Exit range check for args early. #67423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

nate-chandler
Copy link
Contributor

@nate-chandler nate-chandler commented Jul 20, 2023

When determining whether a copy_value is part of a copy->store pair, if the value being copied is guaranteed, it is checked whether the store is within the lifetime of all its guaranteed roots. If one of those guaranteed roots is a function argument, the store is certainly within the lifetime, so exit early.

When determining whether a copy_value is part of a copy->store pair, if
the value being copied is guaranteed, it is checked whether the store is
within the lifetime of all its guaranteed roots.  If one of those
guaranteed roots is a function argument, the store is certainly within
the lifetime, so exit early.
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler nate-chandler merged commit 8cb61d1 into swiftlang:main Jul 20, 2023
@nate-chandler nate-chandler deleted the opaque-values/20230719/2/all_stores_within_guaranteed_argument_lifetime branch July 20, 2023 15:27
Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants