Skip to content

Commit 49e9284

Browse files
Merge pull request #66680 from nate-chandler/rdar110854874
[CanonicalizeOSSALifetime] Bail early in lifetime extension backwards walk.
2 parents b420190 + 57e226d commit 49e9284

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/SILOptimizer/Utils/CanonicalizeOSSALifetime.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,8 @@ void CanonicalizeOSSALifetime::extendUnconsumedLiveness(
558558

559559
// Walk backwards from consuming blocks.
560560
while (auto *block = worklist.pop()) {
561-
originalLiveBlocks.insert(block);
561+
if (!originalLiveBlocks.insert(block))
562+
continue;
562563
for (auto *predecessor : block->getPredecessorBlocks()) {
563564
// If the block was discovered by liveness, we already added it to the
564565
// set.

0 commit comments

Comments
 (0)