diff --git a/lib/SILOptimizer/PassManager/PassPipeline.cpp b/lib/SILOptimizer/PassManager/PassPipeline.cpp index a830f135bffde..182c10344531c 100644 --- a/lib/SILOptimizer/PassManager/PassPipeline.cpp +++ b/lib/SILOptimizer/PassManager/PassPipeline.cpp @@ -308,18 +308,18 @@ void addFunctionPasses(SILPassPipelinePlan &P, // Promote stack allocations to values. P.addMem2Reg(); - // We earlier eliminated ownership if we are not compiling the stdlib. Now - // handle the stdlib functions, re-simplifying, eliminating ARC as we do. - P.addCopyPropagation(); - P.addSemanticARCOpts(); - P.addNonTransparentFunctionOwnershipModelEliminator(); - // Run the existential specializer Pass. P.addExistentialSpecializer(); // Cleanup, which is important if the inliner has restarted the pass pipeline. P.addPerformanceConstantPropagation(); + // We earlier eliminated ownership if we are not compiling the stdlib. Now + // handle the stdlib functions, re-simplifying, eliminating ARC as we do. + P.addCopyPropagation(); + P.addSemanticARCOpts(); + P.addNonTransparentFunctionOwnershipModelEliminator(); + addSimplifyCFGSILCombinePasses(P); P.addArrayElementPropagation();