Skip to content

Commit 5be1585

Browse files
authored
Merge pull request swiftlang#32835 from gottesmm/pr-719a3f1e89c7bed3246914b5ff52fd00d4486840
[ownership] Move ownership lowering past the eager specializer on the stdlib.
2 parents 856afbb + 0dbed44 commit 5be1585

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lib/SILOptimizer/PassManager/PassPipeline.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -457,10 +457,6 @@ static void addPerfEarlyModulePassPipeline(SILPassPipelinePlan &P) {
457457
// optimization.
458458
P.addGlobalOpt();
459459

460-
// We earlier eliminated ownership if we are not compiling the stdlib. Now
461-
// handle the stdlib functions.
462-
P.addNonTransparentFunctionOwnershipModelEliminator();
463-
464460
// Add the outliner pass (Osize).
465461
P.addOutliner();
466462

@@ -485,6 +481,11 @@ static void addHighLevelFunctionPipeline(SILPassPipelinePlan &P) {
485481
P.startPipeline("HighLevel,Function+EarlyLoopOpt");
486482
// FIXME: update EagerSpecializer to be a function pass!
487483
P.addEagerSpecializer();
484+
485+
// We earlier eliminated ownership if we are not compiling the stdlib. Now
486+
// handle the stdlib functions.
487+
P.addNonTransparentFunctionOwnershipModelEliminator();
488+
488489
addFunctionPasses(P, OptimizationLevelKind::HighLevel);
489490

490491
addHighLevelLoopOptPasses(P);
@@ -714,6 +715,8 @@ SILPassPipelinePlan::getPerformancePassPipeline(const SILOptions &Options) {
714715
//
715716
// FIXME: When *not* emitting a .swiftmodule, skip the high-level function
716717
// pipeline to save compile time.
718+
//
719+
// NOTE: Ownership is now stripped within this function!
717720
addHighLevelFunctionPipeline(P);
718721

719722
addHighLevelModulePipeline(P);

0 commit comments

Comments
 (0)