File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
lib/SILOptimizer/PassManager Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -436,7 +436,17 @@ static void addPerfEarlyModulePassPipeline(SILPassPipelinePlan &P) {
436436 // not blocked by any other passes' optimizations, so do it early.
437437 P.addDifferentiabilityWitnessDevirtualizer ();
438438
439- // Strip ownership from non-transparent functions.
439+ // Strip ownership from non-transparent functions when we are not compiling
440+ // the stdlib module. When compiling the stdlib, we eliminate ownership on
441+ // these functions later with a nromal call to
442+ // P.addNonTransparentFunctionOwnershipModelEliminator().
443+ //
444+ // This is done so we can push ownership through the pass pipeline first for
445+ // the stdlib and then everything else.
446+ P.addNonStdlibNonTransparentFunctionOwnershipModelEliminator ();
447+
448+ // We earlier eliminated ownership if we are not compiling the stdlib. Now
449+ // handle the stdlib functions.
440450 P.addNonTransparentFunctionOwnershipModelEliminator ();
441451
442452 // Start by linking in referenced functions from other modules.
You can’t perform that action at this time.
0 commit comments