Skip to content

Liveness cleanup - preparation for OSSA liveness #61475

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
Oct 7, 2022

Conversation

atrick
Copy link
Contributor

@atrick atrick commented Oct 6, 2022

Main commit: Split PrunedLiveness::findBoundariesInBlock into fast paths

This allows dynamic dispatch into the fast paths. It's also easier to
understand the fast paths when written as separate loops.

This way, we can used MultiDefPrunedLiveness to compute ownership
liveness, but still benefit from the fact that the common case (owned
non-phi value) is much simpler and faster to compute.

This approach is necessary because we use stack-based data structures
within the liveness result, so we need to statically instantiate
something that can handle all cases.

atrick added 2 commits October 5, 2022 06:30
If we want a short-circuit test for address types, that should be done
within getOwnershipKind() itself.
@atrick
Copy link
Contributor Author

atrick commented Oct 6, 2022

@swift-ci test

@atrick
Copy link
Contributor Author

atrick commented Oct 6, 2022

😒TEST 'lldb-api :: lang/swift/async/stepping/step-in/TestSwiftStepInAsync.py' FAILED

@atrick
Copy link
Contributor Author

atrick commented Oct 6, 2022

@swift-ci smoke test macOS platform

This allows dynamic dispatch into the fast paths. It's also easier to
understand the fast paths when written as separate loops.

This way, we can used MultiDefPrunedLiveness to compute ownership
liveness, but still benefit from the fact that the common case (owned
non-phi value) is much simpler and faster to compute.

This approach is necessary because we use stack-based data structures
within the liveness result, so we need to statically instantiate
something that can handle all cases.
@atrick
Copy link
Contributor Author

atrick commented Oct 7, 2022

@swift-ci smoke test and merge

@swift-ci swift-ci merged commit 4d561ee into swiftlang:main Oct 7, 2022
@atrick atrick deleted the liveness-cleanup branch October 7, 2022 16:25
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