-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[addr-move-function] Wire up closure operands to the caller global data flow. #40776
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
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
…ssonly) x (let, var)
These operands are not actually consumed. They are instead vars that are represented as inout_aliasable closure arguments (or defer arguments) that we convert to @out parameters after performing move checking.
We can always derive isUpwardsUse, isUpwardsConsume from the result downward scan result within the struct.
…flow and not in the middle of the closure capture analysis. Just makes jumping around the file less consuing since the topic is consistent within the closure captured variable analysis.
…lti-block callers. I just forgot to include this in the previous PR. I added some more tests around it.
@swift-ci test |
…tain destroy_addr to insert compensating destroy_addr. This doesn't work well if one can potentially not have any input destroy_addr... I actually already know the address without inferring it, so I changed the code to just use that. I also added more tests around defer/without defer that exercise this behavior.
…ure that we properly error on them.
…error on these. To improve the diagnostics though I think I am going to have to add a closure operand analysis to copyable values like I did for copyable addresses...
@swift-ci test |
Build failed |
Linux failure is I think unrelated to my PR. Its in the driver. |
@swift-ci test linux platform |
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.
In #40775, I forgot to wire up closure operands to the caller global data flow. I do that in one of the attached commits, fix a few bugs, and more tests for partial apply, casts, and defers.