Skip to content

[ShrinkBorrowScope] Adopt iterative dataflow. #58934

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 3 commits into from
May 24, 2022

Conversation

nate-chandler
Copy link
Contributor

@nate-chandler nate-chandler commented May 16, 2022

Adopt IterativeBackwardReachability and VisitBarrierAccessScopes. Enables hoisting borrow scopes over loops and avoiding hoisting borrow scopes into unrelated access scopes, respectively.

rdar://93186505
rdar://93060369

@nate-chandler
Copy link
Contributor Author

@swift-ci please smoke test

@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler
Copy link
Contributor Author

@swift-ci please benchmark

@nate-chandler nate-chandler force-pushed the rdar93186505 branch 2 times, most recently from 9a819f5 to eff9294 Compare May 19, 2022 15:39
@nate-chandler nate-chandler marked this pull request as ready for review May 19, 2022 15:39
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler nate-chandler force-pushed the rdar93186505 branch 2 times, most recently from 0502a23 to e568302 Compare May 21, 2022 02:53
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler
Copy link
Contributor Author

@swift-ci please test source compatibility

Adopt IterativeBackwardReachability.  Enables hoisting end_borrow
instructions over loops.  That in turn enables hoisting destroy_values
over those same loops.

rdar://93186505
Avoids hoisting borrow scopes into unrelated access scopes which could
introduce exclusivity violations.

rdar://93060369
@nate-chandler
Copy link
Contributor Author

@swift-ci please smoke test

@nate-chandler nate-chandler merged commit 5bd541c into swiftlang:main May 24, 2022
@nate-chandler nate-chandler deleted the rdar93186505 branch May 24, 2022 17: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