-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[OSSA] Migrate AccessedStorage #35520
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
Handle begin_borrow -> convert_escape_to_noescape sequences.
Ignore end_borrow as a user of the access path. I don't think there's any value in viewing it as a use of the access path because we really care about address reads and writes in this context, not object lifetime extension. Treating it as an access path use clutters the analysis, and I'm afraid it will inhibit optimization.
@swift-ci test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I just had a comment on whether copy_value needs to be handled as well while looking for callee origin.
if (auto *beginBorrow = dyn_cast<BeginBorrowInst>(Callee)) { | ||
Callee = beginBorrow->getOperand(); | ||
continue; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we also need to handle copy_value here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, we should handle copy_value
. I added another commit to this PR.
Build failed |
@swift-ci test |
A couple of minor changes to the AccessedStorage utilities.
Handle begin_borrow->convert_escape_to_noescape
All tests that directly use the utilities are migrated.