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
1040
1040
ALWAYS_NON_ESCAPING_INST (Load)
1041
1041
ALWAYS_NON_ESCAPING_INST (StrongRelease)
1042
1042
ALWAYS_NON_ESCAPING_INST (DestroyValue)
1043
+ ALWAYS_NON_ESCAPING_INST (EndBorrow)
1043
1044
#undef ALWAYS_NON_ESCAPING_INST
1044
1045
1045
1046
bool visitDeallocBoxInst (DeallocBoxInst *dbi) {
@@ -1213,7 +1214,8 @@ static bool findEscapeOrMutationUses(Operand *op,
1213
1214
// we want to be more conservative around non-top level copies (i.e. a copy
1214
1215
// derived from a projection like instruction). In fact such a thing may not
1215
1216
// even make any sense!
1216
- if (isa<CopyValueInst>(user) || isa<MarkUninitializedInst>(user)) {
1217
+ if (isa<CopyValueInst>(user) || isa<MarkUninitializedInst>(user) ||
1218
+ isa<BeginBorrowInst>(user)) {
1217
1219
bool foundSomeMutations = false ;
1218
1220
for (auto *use : cast<SingleValueInstruction>(user)->getUses ()) {
1219
1221
foundSomeMutations |= findEscapeOrMutationUses (use, state);
You can’t perform that action at this time.
0 commit comments