mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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.
This commit is contained in:
@@ -274,7 +274,6 @@ void swift::runSILOptimizationPasses(SILModule &Module) {
|
|||||||
PM.setStageName("HighLevel");
|
PM.setStageName("HighLevel");
|
||||||
AddSSAPasses(PM, OptimizationLevelKind::HighLevel);
|
AddSSAPasses(PM, OptimizationLevelKind::HighLevel);
|
||||||
PM.runOneIteration();
|
PM.runOneIteration();
|
||||||
PM.runOneIteration();
|
|
||||||
PM.resetAndRemoveTransformations();
|
PM.resetAndRemoveTransformations();
|
||||||
|
|
||||||
PM.setStageName("EarlyLoopOpt");
|
PM.setStageName("EarlyLoopOpt");
|
||||||
@@ -294,7 +293,6 @@ void swift::runSILOptimizationPasses(SILModule &Module) {
|
|||||||
PM.setStageName("MidLevel");
|
PM.setStageName("MidLevel");
|
||||||
AddSSAPasses(PM, OptimizationLevelKind::MidLevel);
|
AddSSAPasses(PM, OptimizationLevelKind::MidLevel);
|
||||||
PM.runOneIteration();
|
PM.runOneIteration();
|
||||||
PM.runOneIteration();
|
|
||||||
PM.resetAndRemoveTransformations();
|
PM.resetAndRemoveTransformations();
|
||||||
|
|
||||||
// Perform lowering optimizations.
|
// Perform lowering optimizations.
|
||||||
|
|||||||
Reference in New Issue
Block a user