mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[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:
@@ -337,7 +337,7 @@ bool LoadBorrowImmutabilityAnalysis::isImmutableInScope(
|
||||
continue;
|
||||
}
|
||||
|
||||
if (borrowLiveness.isWithinBoundary(write)) {
|
||||
if (borrowLiveness.isWithinBoundary(write, /*deadEndBlocks=*/nullptr)) {
|
||||
llvm::errs() << "Write: " << *write;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user