Skip to content

[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

Merged
merged 5 commits into from
Jan 21, 2021
Merged

Conversation

atrick
Copy link
Contributor

@atrick atrick commented Jan 20, 2021

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.

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.
@atrick atrick requested a review from meg-gupta January 20, 2021 19:43
@atrick
Copy link
Contributor Author

atrick commented Jan 20, 2021

@swift-ci test

Copy link
Contributor

@meg-gupta meg-gupta left a 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;
}
Copy link
Contributor

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 ?

Copy link
Contributor Author

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.

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 75e7f71

@atrick
Copy link
Contributor Author

atrick commented Jan 21, 2021

@swift-ci test

@atrick atrick merged commit 0bd17e4 into swiftlang:main Jan 21, 2021
@atrick atrick deleted the ossa-accessedstorage branch January 21, 2021 05:47
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.

3 participants