@@ -155,8 +155,8 @@ bool SemanticARCOptVisitor::performGuaranteedCopyValueOptimization(
155
155
// TODO: There may be some way of sinking this into the loop below.
156
156
//
157
157
// FIXME: The haveAnyLocalScopes and destroy.empty() checks are relics of
158
- // attempts to handle dead end blocks during areUsesWithinLocalScope . If we
159
- // don't use dead end blocks at all, they should not be relevant.
158
+ // attempts to handle dead end blocks during areUsesWithinTransitiveScope . If
159
+ // we don't use dead end blocks at all, they should not be relevant.
160
160
bool haveAnyLocalScopes =
161
161
llvm::any_of (borrowScopeIntroducers, [](BorrowedValue borrowScope) {
162
162
return borrowScope.isLocalScope ();
@@ -182,15 +182,15 @@ bool SemanticARCOptVisitor::performGuaranteedCopyValueOptimization(
182
182
// need to insert an end_borrow since all of our borrow introducers are
183
183
// non-local scopes.
184
184
//
185
- // The call to areUsesWithinLocalScope cannot consider dead-end blocks. A
185
+ // The call to areUsesWithinTransitiveScope cannot consider dead-end blocks. A
186
186
// local borrow scope requires all its inner uses to be inside the borrow
187
187
// scope, regardless of whether the end of the scope is inside a dead-end
188
188
// block.
189
189
{
190
190
SmallVector<Operand *, 8 > scratchSpace;
191
191
if (llvm::any_of (borrowScopeIntroducers, [&](BorrowedValue borrowScope) {
192
- return !borrowScope.areUsesWithinLocalScope (lr. getAllConsumingUses (),
193
- nullptr );
192
+ return !borrowScope.areUsesWithinTransitiveScope (
193
+ lr. getAllConsumingUses (), nullptr );
194
194
})) {
195
195
return false ;
196
196
}
@@ -218,7 +218,7 @@ bool SemanticARCOptVisitor::performGuaranteedCopyValueOptimization(
218
218
}
219
219
220
220
if (llvm::any_of (borrowScopeIntroducers, [&](BorrowedValue borrowScope) {
221
- return !borrowScope.areUsesWithinLocalScope (
221
+ return !borrowScope.areUsesWithinTransitiveScope (
222
222
phiArgLR.getAllConsumingUses (), nullptr );
223
223
})) {
224
224
return false ;
0 commit comments