-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[5.9] MultiDefPrunedLiveness: add support for arbitrary uses/defs #65000
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
Contributor
Author
|
@swift-ci test |
nate-chandler
approved these changes
Apr 7, 2023
095f927 to
1968d00
Compare
Contributor
Author
|
@swift-ci test |
Because it doesn't really hold a "string".
We need this for specifications that involve multiple components and long instruction lists. (cherry picked from commit aa46954)
This provides a way to test liveness based on non-SSA values. The move checker is now using pruned liveness this way. So we need a way to test that liveness no longer makes any assumptions about SSA values. These test cases need to explicitly specify all the def and use instructions. (cherry picked from commit 37ff9ad)
This was recently introduced as a result of rebasing commits. It never did anything useful on the main branch. (cherry picked from commit 20604ab)
(cherry picked from commit 927d526)
(cherry picked from commit 54d4082)
PrunedLiveness only knows about the live blocks and uses. The PrunedLiveRange subclass is now responsible for updating liveness based on both the defs and uses. This is in preparation for handling non-SSA liveness when uses occur before the first def. (cherry picked from commit d44c7f3)
This now supports liveness holes within blocks where previously we expected a phi def. PrunedLiveness is streamlined for SSA liveness where we expect the defs and uses to be related in the SSA def-use graph. MultiDefPrunedLiveness was added on top of SSAPrunedLivenes to handle extended SSA liveness that occurs with phis, but are still connected in the def-use graph. Recently MultiDefPrunedLiveness was repurposed for liveness of addressible storage. This means that we can now have uses before defs in the same block without a corresponding phi. Fortunately, handling this case is a straightforward extension of MultiDefPrunedLiveness that does not complicate or penalize the streamlined SSA case. Fixes rdar://107740403 ([move-only] Add support for addressable values in MultiDefPrunedLiveness) (cherry picked from commit c9eb1ae)
1968d00 to
8bca3f1
Compare
Contributor
Author
|
@swift-ci test |
Contributor
Author
tbkka
approved these changes
Apr 8, 2023
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.
This now supports liveness holes within blocks where previously we
expected a phi def.
PrunedLiveness is streamlined for SSA liveness where we expect the
defs and uses to be related in the SSA def-use graph.
MultiDefPrunedLiveness was added on top of SSAPrunedLivenes to handle
extended SSA liveness that occurs with phis, but are still connected
in the def-use graph. Recently MultiDefPrunedLiveness was repurposed
for liveness of addressible storage. This means that we can now have
uses before defs in the same block without a corresponding phi.
Fortunately, handling this case is a straightforward extension of
MultiDefPrunedLiveness that does not complicate or penalize the
streamlined SSA case.
Fixes rdar://107740403 ([move-only] Add support for addressable values in MultiDefPrunedLiveness)