Skip to content

[LexicalDestroyHoisting] Adopt iterative dataflow. #58939

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 destroy_values over loops and avoiding hoisting destroy_values into unrelated access scopes, respectively.

rdar://93369506

@nate-chandler nate-chandler requested a review from atrick May 16, 2022 23:27
@nate-chandler
Copy link
Contributor Author

@swift-ci please smoke test

@nate-chandler nate-chandler changed the title [LexicalDestroyFolding] Adopt iterative dataflow. [LexicalDestroyHoisting] Adopt iterative dataflow. May 19, 2022
@nate-chandler nate-chandler marked this pull request as ready for review May 19, 2022 16:26
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@atrick
Copy link
Contributor

atrick commented May 19, 2022

Same comment for LexicalDestroyHoisting...

The boilerplate detracts from readability. But I think that's mostly solved by moving the small method bodies in-line with the class definition--the ones that just provide abstraction or implement template interfaces, but don't have any nontrivial switches or loops.

@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 destroy_values
over loops.

rdar://93369506
Avoids hoisting destroy_values into unrelated access scopes which could
introduce exclusivity violations.
@nate-chandler
Copy link
Contributor Author

@swift-ci please test

@nate-chandler
Copy link
Contributor Author

@swift-ci please test windows platform

@nate-chandler nate-chandler merged commit 0ce821a into swiftlang:main May 24, 2022
@nate-chandler nate-chandler deleted the rdar93369506 branch May 24, 2022 21:14
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