File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1598,7 +1598,7 @@ void swift::insertDeallocOfCapturedArguments(
1598
1598
SmallVector<Operand *, 2 > uses;
1599
1599
auto useFinding = findTransitiveUsesForAddress (asi, &uses);
1600
1600
InstructionSet users (asi->getFunction ());
1601
- if (useFinding != AddressUseKind::Unknown ) {
1601
+ if (useFinding == AddressUseKind::NonEscaping ) {
1602
1602
for (auto use : uses) {
1603
1603
users.insert (use->getUser ());
1604
1604
}
@@ -1609,7 +1609,7 @@ void swift::insertDeallocOfCapturedArguments(
1609
1609
if (isa<UnreachableInst>(terminator))
1610
1610
continue ;
1611
1611
SILInstruction *insertionPoint = nullptr ;
1612
- if (useFinding != AddressUseKind::Unknown ) {
1612
+ if (useFinding == AddressUseKind::NonEscaping ) {
1613
1613
insertionPoint = &block->front ();
1614
1614
for (auto &instruction : llvm::reverse (*block)) {
1615
1615
if (users.contains (&instruction)) {
@@ -2463,6 +2463,7 @@ SILValue swift::getInitOfTemporaryAllocStack(AllocStackInst *asi) {
2463
2463
2464
2464
AddressWalkerState state (asi->getFunction ());
2465
2465
AddressWalker walker (state);
2466
+ // Note: ignore pointer escapes for the purpose of finding initializers.
2466
2467
if (std::move (walker).walk (asi) == AddressUseKind::Unknown ||
2467
2468
state.foundError )
2468
2469
return SILValue ();
You can’t perform that action at this time.
0 commit comments