@@ -522,7 +522,7 @@ void CanonicalizeOSSALifetime::findOriginalBoundary(
522522// / These are the "original" live blocks (originalLiveBlocks).
523523// / [Color these blocks green.]
524524// / - From within that collection, collect the blocks which contain a _final_
525- // / consuming, non-destroy use, and their successors.
525+ // / consuming, non-destroy use, and their iterative successors.
526526// / These are the "consumed" blocks (consumedAtExitBlocks).
527527// / [Color these blocks red.]
528528// / - Extend liveness down to the boundary between originalLiveBlocks and
@@ -569,8 +569,11 @@ void CanonicalizeOSSALifetime::extendUnconsumedLiveness(
569569 }
570570 }
571571
572- // Second, collect the blocks which occur after a _final_ consuming use.
572+ // Second, collect the blocks which contain a _final_ consuming use and their
573+ // iterative successors within the originalLiveBlocks.
573574 BasicBlockSet consumedAtExitBlocks (currentDef->getFunction ());
575+ // The subset of consumedAtExitBlocks which do not contain a _final_ consuming
576+ // use, i.e. the subset that is dead.
574577 StackList<SILBasicBlock *> consumedAtEntryBlocks (currentDef->getFunction ());
575578 {
576579 // Start the forward walk from blocks which contain _final_ non-destroy
@@ -596,8 +599,8 @@ void CanonicalizeOSSALifetime::extendUnconsumedLiveness(
596599 }
597600 }
598601
599- // Third, find the blocks on the boundary between the originally-live blocks
600- // and the originally-live-but-consumed blocks. Extend liveness "to the end"
602+ // Third, find the blocks on the boundary between the originalLiveBlocks
603+ // blocks and the consumedAtEntryBlocks blocks. Extend liveness "to the end"
601604 // of these blocks.
602605 for (auto *block : consumedAtEntryBlocks) {
603606 for (auto *predecessor : block->getPredecessorBlocks ()) {
0 commit comments