Skip to content

Commit 5ab8022

Browse files
committed
[ownership] Move ownership lowering to right before the first inliner run.
I am doing this to separate the perf effect of moving ownership past the inliner with this earlier stuff.
1 parent 0bd4a6d commit 5ab8022

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/SILOptimizer/PassManager/PassPipeline.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -314,12 +314,6 @@ void addFunctionPasses(SILPassPipelinePlan &P,
314314
// Cleanup, which is important if the inliner has restarted the pass pipeline.
315315
P.addPerformanceConstantPropagation();
316316

317-
// We earlier eliminated ownership if we are not compiling the stdlib. Now
318-
// handle the stdlib functions, re-simplifying, eliminating ARC as we do.
319-
P.addCopyPropagation();
320-
P.addSemanticARCOpts();
321-
P.addNonTransparentFunctionOwnershipModelEliminator();
322-
323317
addSimplifyCFGSILCombinePasses(P);
324318

325319
P.addArrayElementPropagation();
@@ -351,6 +345,12 @@ void addFunctionPasses(SILPassPipelinePlan &P,
351345
// class_method/witness_method instructions may use concrete types now.
352346
P.addDevirtualizer();
353347

348+
// We earlier eliminated ownership if we are not compiling the stdlib. Now
349+
// handle the stdlib functions, re-simplifying, eliminating ARC as we do.
350+
P.addCopyPropagation();
351+
P.addSemanticARCOpts();
352+
P.addNonTransparentFunctionOwnershipModelEliminator();
353+
354354
switch (OpLevel) {
355355
case OptimizationLevelKind::HighLevel:
356356
// Does not inline functions with defined semantics.

0 commit comments

Comments
 (0)