Skip to content

Commit b00dcbe

Browse files
committed
Remove two runs of the passes in AddSSAPasses.
I measure around a 10% reduction in compile times of release no-assert builds of the stdlib and StdlibUnitTest. For release + debug-swift builds, I see 20% reduction in stdlib compile time. I saw no reproducible regressions in the benchmarks, and a few improvements. There is a small (0.1%) reduction in the libswiftCore.dylib size. Being able to remove these is a consequence of the reordering that happened in e50daa6.
1 parent 54d91c9 commit b00dcbe

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

lib/SILOptimizer/PassManager/Passes.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,6 @@ void swift::runSILOptimizationPasses(SILModule &Module) {
274274
PM.setStageName("HighLevel");
275275
AddSSAPasses(PM, OptimizationLevelKind::HighLevel);
276276
PM.runOneIteration();
277-
PM.runOneIteration();
278277
PM.resetAndRemoveTransformations();
279278

280279
PM.setStageName("EarlyLoopOpt");
@@ -294,7 +293,6 @@ void swift::runSILOptimizationPasses(SILModule &Module) {
294293
PM.setStageName("MidLevel");
295294
AddSSAPasses(PM, OptimizationLevelKind::MidLevel);
296295
PM.runOneIteration();
297-
PM.runOneIteration();
298296
PM.resetAndRemoveTransformations();
299297

300298
// Perform lowering optimizations.

0 commit comments

Comments
 (0)