Skip to content

Commit 7a6ed1a

Browse files
committed
Handle begin_apply in TempRVO
A tempobj passed to begin_apply instruction and cannot be modified by it (is guaranteed and doesn't alias with other inout args) can be optimzed away.
1 parent 142791b commit 7a6ed1a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/SILOptimizer/Transforms/TempRValueElimination.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ bool TempRValueOptPass::collectLoads(
171171
return false;
172172
LLVM_FALLTHROUGH;
173173
case SILInstructionKind::ApplyInst:
174+
case SILInstructionKind::BeginApplyInst:
174175
case SILInstructionKind::TryApplyInst: {
175176
ApplySite apply(user);
176177

0 commit comments

Comments
 (0)