Skip to content

Commit bf75d9b

Browse files
committed
Add a round of ossa arc opts before lowering to non-ossa
1 parent ed520be commit bf75d9b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/SILOptimizer/PassManager/PassPipeline.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,12 @@ void addFunctionPasses(SILPassPipelinePlan &P,
418418
P.addPerformanceConstantPropagation();
419419

420420
if (!P.getOptions().EnableOSSAModules) {
421+
// Last chance to run ossa opts, run them here before lowering to non-ossa.
422+
if (P.getOptions().CopyPropagation == CopyPropagationOption::On) {
423+
P.addComputeSideEffects();
424+
P.addCopyPropagation();
425+
}
426+
P.addSemanticARCOpts();
421427
if (P.getOptions().StopOptimizationBeforeLoweringOwnership)
422428
return;
423429

0 commit comments

Comments
 (0)