Skip to content

[pruned-liveness] Teach PrunedLiveBlocks how to handle liveness for multiple bits. #60710

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

gottesmm
Copy link
Contributor

This is in preparation for landing a larger FieldSensitivePrunedLiveness (I am chopping off a larger part of that work).

Importantly, by committing this separately, I can use the current PrunedLiveness implementation to validate this larger piece of work.

…ltiple bits of liveness rather than just one.

This is useful for making a form of PrunedLiveness that is sensitive to address
fields. I wired up the current PrunedLiveness to just use PrunedLiveBlocks with
num bits set to 1.
@gottesmm gottesmm requested a review from atrick August 22, 2022 19:13
@gottesmm
Copy link
Contributor Author

@swift-ci test

…resent its state instead of 1 + missing value in DenseMap.

The reason why I am doing this is that in order to be able to use
PrunedLivenessBlocks with multiple elements, we can no longer rely on dead being
represented by a block not having any state, since a dead bit could have a
neighboring live bit.

That being said, the only place that this is used now is the current
PrunedLiveness implementation which only stores a single bit... but that still
at least exercises the code and lets us know that it works.
@gottesmm gottesmm force-pushed the pr-1212688e62da727448883168d77ba9b98fa6d4dc branch from d451aca to e51e17f Compare August 22, 2022 20:26
@gottesmm
Copy link
Contributor Author

@swift-ci test

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.

Makes sense for testing. As we discussed, the lightweight utility really should use neither a SmallVector nor a DenseMap. So we'll need to fix that later.

@gottesmm
Copy link
Contributor Author

@swift-ci test macOS platform

@gottesmm gottesmm merged commit a95e018 into swiftlang:main Aug 23, 2022
@gottesmm gottesmm deleted the pr-1212688e62da727448883168d77ba9b98fa6d4dc branch August 23, 2022 22:49
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