-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[pruned-liveness] Make some small fixes that only are exposed when working with multi-bit code #62907
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
Conversation
… &) implementation. For some reason LLVM doesn't provide this. I have written a few versions of this in the Swift codebase. Makes sense to factor it out before I make another one.
…keys have been deleted from the mult-map. This is useful to validate that a multi-map has been completely consumed as one erases values from it.
…s except just the first bit.
… only one entry per live bit. Previously, we would pan the array with isDead. The thinking is that this would make it easier to bitmask directly against. In practice, this usage was a minor use case and doing this lead to a bunch of logic mistakes in forthcoming code.
Just a small cleanup that will improve performance in the scalar case which is important for OSSA utilities.
…e only scalar logic. I did this by doing the following: 1. I renamed computeUseBlockLiveness to computeScalarUseBlockLiveness and changed it to take a specific bit that it is testing for. 2. I changed the logic that already existed in this code path that worked scalar by scalar to use scalar logic rather than call the broken multi-bit at a time code path. 3. We took advantage of resultingFoundLiveness now only returning the requested bits instead of all bits. This ensures that we do not run computeScalarUseBlockLiveness for those unneeded dead bits resulting in liveness being inappropriately propagated into predecessors.
…ion for each bit rather than attempt to do it for all bits at the same time.
@swift-ci test |
The reason why I think this hasn't hit the main move only address impl is that I am now fixing how we hoist destroy_addr which exposes these issues when we have partially deinited structs. |
…sue the scalar version of markBlockLive
@swift-ci test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. It'll be great to separate the field sensitive code.
[pruned-liveness] Make some small fixes that only are exposed when working with multi-bit code
I just merged this and I think GitHub hit an issue where it didn't realize the merge went through? I guess I am just going to close this PR. |
I am fixing some issues that I discovered in FieldSensitive liveness which internally uses pruned live blocks. There are a few things that I did here that fix some architectural issues:
NOTE: This is an interim change. I plan on splitting PrunedLiveBlocks into two separate implementations in a subsequent commit. The first will take advantage of SILNodeBits and only handle single bits and we will have a separate FieldSensitive one that handles multiple bits.