Handle OperandOwnerhip::NonUse in PrunedLiveness::computeSSALiveness. #61145
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.
Fixes a bug in the simple PrunedLiveness routine for SSA values.
Without this fix, the init_existential_ref instruction below was not considered a lifetime-ending use because the non-use type dependednt operand (which is not really an operand at all) would override the forwarding operand:
%1 = open_existential_ref %0 :$any P to $ @opened("...", any P) Self$@opened("...", any P) Self : $ @opened("...", any P) Self, $AnyObject
%2 = init_existential_ref %1 :
This will be tested by silgen_cleanup_complete_ossa.sil.
The test is on a branch. It isn't possible to commit it until we use this utility in more interesting places. But I want to make sure fixing it doesn't disrupt anything first.