[NFC] PrunedLiveness: Clarified boundary API.

When checking whether an instruction is contained in a liveness
boundary, a pointer to a DeadEndBlocks instance must always be passed.
When the pointer is null, it is only checked that the instruction occurs
within the direct live region.  When the pointer is non-null, it is
checked whether the instruction occurs within the region obtained by
extending the live region up to the availability boundary within
dead-end regions that are adjacent to the non-lifetime-ending portion of
the liveness boundary.
This commit is contained in:
Nate Chandler
2024-07-22 16:51:56 -07:00
parent e0da318129
commit 812891cf81
13 changed files with 47 additions and 32 deletions

View File

@@ -337,7 +337,7 @@ bool LoadBorrowImmutabilityAnalysis::isImmutableInScope(
continue;
}
if (borrowLiveness.isWithinBoundary(write)) {
if (borrowLiveness.isWithinBoundary(write, /*deadEndBlocks=*/nullptr)) {
llvm::errs() << "Write: " << *write;
return false;
}