Skip to content

Commit 06a7e7c

Browse files
committed
[NFC] DestroyAddrHoisting: Add subpass bailouts.
1 parent 018db82 commit 06a7e7c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/SILOptimizer/Transforms/DestroyAddrHoisting.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -945,6 +945,8 @@ void DestroyAddrHoisting::hoistDestroys(
945945
// blocks and pushing begin_access as we see them and then popping them off
946946
// the end will result in hoisting inner begin_access' destroy_addrs first.
947947
for (auto *bai : llvm::reverse(bais)) {
948+
if (!continueWithNextSubpassRun(bai))
949+
return;
948950
// [exclusive_modify_scope_hoisting] Hoisting within modify access scopes
949951
// doesn't respect deinit barriers because
950952
//
@@ -961,6 +963,8 @@ void DestroyAddrHoisting::hoistDestroys(
961963
}
962964
// Alloc stacks always enclose their accesses.
963965
for (auto *asi : asis) {
966+
if (!continueWithNextSubpassRun(asi))
967+
return;
964968
changed |= ::hoistDestroys(asi,
965969
/*ignoreDeinitBarriers=*/!asi->isLexical(),
966970
remainingDestroyAddrs, deleter, calleeAnalysis);
@@ -969,6 +973,8 @@ void DestroyAddrHoisting::hoistDestroys(
969973
for (auto *uncastArg : getFunction()->getArguments()) {
970974
auto *arg = cast<SILFunctionArgument>(uncastArg);
971975
if (arg->getType().isAddress()) {
976+
if (!continueWithNextSubpassRun(arg))
977+
return;
972978
auto convention = arg->getArgumentConvention();
973979
// This is equivalent to writing
974980
//

0 commit comments

Comments
 (0)