@@ -439,16 +439,22 @@ static bool endLifetimeAtBoundary(SILValue value,
439439 return changed;
440440}
441441
442+ bool OSSALifetimeCompletion::analyzeAndUpdateLifetime (
443+ ScopedAddressValue scopedAddress, Boundary boundary) {
444+ SmallVector<SILBasicBlock *, 8 > discoveredBlocks;
445+ SSAPrunedLiveness liveness (scopedAddress->getFunction (), &discoveredBlocks);
446+ scopedAddress.computeTransitiveLiveness (liveness);
447+ return endLifetimeAtBoundary (scopedAddress.value , liveness, boundary,
448+ deadEndBlocks);
449+ }
450+
442451// / End the lifetime of \p value at unreachable instructions.
443452// /
444453// / Returns true if any new instructions were created to complete the lifetime.
445454bool OSSALifetimeCompletion::analyzeAndUpdateLifetime (SILValue value,
446455 Boundary boundary) {
447456 if (auto scopedAddress = ScopedAddressValue (value)) {
448- SmallVector<SILBasicBlock *, 8 > discoveredBlocks;
449- SSAPrunedLiveness liveness (value->getFunction (), &discoveredBlocks);
450- scopedAddress.computeTransitiveLiveness (liveness);
451- return endLifetimeAtBoundary (value, liveness, boundary, deadEndBlocks);
457+ return analyzeAndUpdateLifetime (scopedAddress, boundary);
452458 }
453459
454460 // Called for inner borrows, inner adjacent reborrows, inner reborrows, and
0 commit comments