Skip to content

Commit d0266e3

Browse files
Merge pull request #75446 from nate-chandler/opt/20240724/1
[NFC] OwnedLifetimeCanonicalization: Switch an API usage.
2 parents a49d07b + 95b8eef commit d0266e3

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

lib/SILOptimizer/Utils/CanonicalizeOSSALifetime.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,8 +1168,8 @@ void CanonicalizeOSSALifetime::rewriteCopies(
11681168
liveness->updateForUse(destroy, /*lifetimeEnding=*/true);
11691169
}
11701170
for (auto *dvi : debugValues) {
1171-
if (liveness->areUsesWithinBoundary(
1172-
{&dvi->getOperandRef()},
1171+
if (liveness->isWithinBoundary(
1172+
dvi,
11731173
deadEndBlocksAnalysis->get(getCurrentDef()->getFunction()))) {
11741174
continue;
11751175
}

test/SILOptimizer/canonicalize_ossa_lifetime_unit.sil

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,3 +600,15 @@ exit:
600600
%retval = tuple ()
601601
return %retval : $()
602602
}
603+
604+
// CHECK-LABEL: begin running test {{.*}} on dead_arg_debug_dead_end
605+
// CHECK-LABEL: sil [ossa] @dead_arg_debug_dead_end : {{.*}} {
606+
// CHECK: debug_value
607+
// CHECK-LABEL: } // end sil function 'dead_arg_debug_dead_end'
608+
// CHECK-LABEL: end running test {{.*}} on dead_arg_debug_dead_end
609+
sil [ossa] @dead_arg_debug_dead_end : $@convention(thin) (@owned C) -> () {
610+
entry(%c : @owned $C):
611+
debug_value %c : $C
612+
specify_test "canonicalize-ossa-lifetime true false true %c"
613+
unreachable
614+
}

0 commit comments

Comments
 (0)