-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[SIL] Key consume addr checking off var_decl attr. #72211
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
Merged
nate-chandler
merged 20 commits into
swiftlang:main
from
nate-chandler:var_decl-alloc_stack
Mar 9, 2024
Merged
[SIL] Key consume addr checking off var_decl attr. #72211
nate-chandler
merged 20 commits into
swiftlang:main
from
nate-chandler:var_decl-alloc_stack
Mar 9, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Renamed "getUsesMoveableValueDebugInfo" to "usesMoveableValueDebugInfo". Clarifies the predicate from "does the receiver have the usesMoveableValueDebugInfo field set?" to "does the receiver use moveable value debug info?".
Help avoid errors with boolean flags by introducing UsesMoveableValueDebugInfo_t.
Help avoid errors with boolean flags by using the new UsesMoveableValueDebugInfo_t.
Help avoid errors with boolean flags by using the new UsesMoveableValueDebugInfo_t.
f740c0b
to
aa803c6
Compare
Previously, all the flags were dropped upon cloning.
Annotate alloc_stack instructions that correspond to VarDecls with the var_decl flag.
As with the lexical flag, when creating an alloc_stack corresponding to an alloc_box, transfer the var_decl flag from any begin_borrow users of the box.
aa803c6
to
b3473eb
Compare
Previously, the lexical attribute on allock_stack instructions was used. This doesn't work for values without lexical lifetimes which are consumed, e.g. stdlib CoW types. Here, the new var_decl attribute on alloc_stack is keyed off of instead. This flag encodes exactly that a value corresponds to a source-level VarDecl, which is the condition under which checking needs to run.
b3473eb
to
a54a8dd
Compare
@swift-ci please test |
@swift-ci please test macos platform |
This was referenced Mar 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, the lexical attribute on
alloc_stack
instructions was used. This doesn't work for values without lexical lifetimes which are consumed, e.g. stdlib CoW types. Here, the newvar_decl
attribute onalloc_stack
is keyed off of instead. This flag encodes exactly that a value corresponds to a source-levelVarDecl
, which is the condition under which checking needs to run.