Skip to content

Commit 5d21e22

Browse files
committed
Comment: CanonicalOSSALifetime TODO (cleanup using PrunedLiveness)
1 parent dc867e4 commit 5d21e22

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/SILOptimizer/Utils/CanonicalOSSALifetime.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,9 @@ void CanonicalizeOSSALifetime::findOrInsertDestroyInBlock(SILBasicBlock *bb) {
514514
/// consuming uses, including destroys on all return paths.
515515
/// - The postdominating consumes cannot be within nested loops.
516516
/// - Any blocks in nested loops are now marked LiveOut.
517+
///
518+
/// TODO: replace this with PrunedLivenessAnalysis::computeBoundary. Separate
519+
/// out destroy insertion, debug info, diagnostics, etc. as post-passes.
517520
void CanonicalizeOSSALifetime::findOrInsertDestroys() {
518521
this->accessBlocks = accessBlockAnalysis->get(getCurrentDef()->getFunction());
519522

@@ -525,7 +528,7 @@ void CanonicalizeOSSALifetime::findOrInsertDestroys() {
525528
switch (liveness.getBlockLiveness(bb)) {
526529
case PrunedLiveBlocks::LiveOut:
527530
// A lifetimeEndBlock may be determined to be LiveOut after analyzing the
528-
// extended It is irrelevent for finding the boundary.
531+
// liveness. It is irrelevent for finding the boundary.
529532
break;
530533
case PrunedLiveBlocks::LiveWithin: {
531534
// The liveness boundary is inside this block. Insert a final destroy

0 commit comments

Comments
 (0)