File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
lib/SILOptimizer/Mandatory Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -1040,6 +1040,7 @@ class NonEscapingUserVisitor
10401040 ALWAYS_NON_ESCAPING_INST (Load)
10411041 ALWAYS_NON_ESCAPING_INST (StrongRelease)
10421042 ALWAYS_NON_ESCAPING_INST (DestroyValue)
1043+ ALWAYS_NON_ESCAPING_INST (EndBorrow)
10431044#undef ALWAYS_NON_ESCAPING_INST
10441045
10451046 bool visitDeallocBoxInst (DeallocBoxInst *dbi) {
@@ -1213,7 +1214,8 @@ static bool findEscapeOrMutationUses(Operand *op,
12131214 // we want to be more conservative around non-top level copies (i.e. a copy
12141215 // derived from a projection like instruction). In fact such a thing may not
12151216 // even make any sense!
1216- if (isa<CopyValueInst>(user) || isa<MarkUninitializedInst>(user)) {
1217+ if (isa<CopyValueInst>(user) || isa<MarkUninitializedInst>(user) ||
1218+ isa<BeginBorrowInst>(user)) {
12171219 bool foundSomeMutations = false ;
12181220 for (auto *use : cast<SingleValueInstruction>(user)->getUses ()) {
12191221 foundSomeMutations |= findEscapeOrMutationUses (use, state);
You can’t perform that action at this time.
0 commit comments