File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
lib/SILOptimizer/Transforms Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,7 @@ bool TempRValueOptPass::collectLoadsFromProjection(
115
115
return true ;
116
116
}
117
117
118
+ // / Check if 'tempObjUser' passed to the apply instruction can be modified by it
118
119
bool TempRValueOptPass::checkNoTempObjectModificationInApply (
119
120
Operand *tempObjUser, SILInstruction *applyInst, SILValue srcAddr) {
120
121
ApplySite apply (applyInst);
@@ -242,6 +243,9 @@ bool TempRValueOptPass::collectLoads(
242
243
return false ;
243
244
244
245
auto beginApply = cast<BeginApplyInst>(user);
246
+ // Register 'eng_apply'/'abort_apply' as loads as well
247
+ // 'checkNoSourceModification' should check instructions until
248
+ // 'end_apply'/'abort_apply' as well
245
249
for (auto tokenUses : beginApply->getTokenResult ()->getUses ()) {
246
250
loadInsts.insert (tokenUses->getUser ());
247
251
}
You can’t perform that action at this time.
0 commit comments