Commits

Xin Tong committed f73626eb28d
Remove 4/5 runs of dead store elimination. I did not measure a real performance difference on my local machine. rdar://24392141 This is going to cut compilation time spent in dead store elim by 5X The last iteration of dead store ran just before the last iteration of arc-sequence-opt allows us to catch some opportunites passes like Mem2Reg can not eliminate. And this allows more code motion freedom. Stdlib -O after removing 4/5 dead stores. ========================================= Running Time Self (ms) Symbol Name 22082.0ms 37.1% 0.0 swift::runSILOptimizationPasses(swift::SILModule&) 21905.0ms 36.8% 0.0 swift::SILPassManager::runOneIteration() 17616.0ms 29.6% 35.0 swift::SILPassManager::runFunctionPasses(llvm::ArrayRef<swift::SILFunctionTransform*>) 16667.0ms 28.0% 55.0 swift::SILPassManager::runPassesOnFunction(llvm::ArrayRef<swift::SILFunctionTransform*>, swift::SILFunction*) 3063.0ms 5.1% 7.0 (anonymous namespace)::SimplifyCFGPass::run() 2936.0ms 4.9% 20.0 (anonymous namespace)::ARCSequenceOpts::run() 2343.0ms 3.9% 3.0 (anonymous namespace)::SILCombine::run() 1900.0ms 3.1% 110.0 (anonymous namespace)::SILCSE::run() 1642.0ms 2.7% 43.0 (anonymous namespace)::RedundantLoadElimination::run() 1113.0ms 1.8% 6.0 (anonymous namespace)::GenericSpecializer::run() 788.0ms 1.3% 120.0 (anonymous namespace)::DCE::run() 495.0ms 0.8% 3.0 (anonymous namespace)::SILCodeMotion::run() 304.0ms 0.5% 1.0 (anonymous namespace)::StackPromotion::run() 292.0ms 0.4% 1.0 (anonymous namespace)::ConstantPropagation::run() 269.0ms 0.4% 5.0 (anonymous namespace)::ABCOpt::run() 236.0ms 0.3% 35.0 (anonymous namespace)::SILSROA::run() 192.0ms 0.3% 2.0 (anonymous namespace)::SILMem2Reg::run() 146.0ms 0.2% 65.0 (anonymous namespace)::SILLowerAggregate::run() 132.0ms 0.2% 5.0 (anonymous namespace)::LICM::run() 132.0ms 0.2% 7.0 (anonymous namespace)::DeadStoreElimination::run() 96.0ms 0.1% 65.0 (anonymous namespace)::Devirtualizer::run() 67.0ms 0.1% 59.0 (anonymous namespace)::DeadObjectElimination::run() 62.0ms 0.1% 44.0 (anonymous namespace)::RemovePinInsts::run() StdlibUnitTest -O after removing 4/5 dead stores. ================================================= Running Time Self (ms) Symbol Name 6958.0ms 26.9% 0.0 swift::runSILOptimizationPasses(swift::SILModule&) 6923.0ms 26.8% 0.0 swift::SILPassManager::runOneIteration() 5638.0ms 21.8% 5.0 swift::SILPassManager::runFunctionPasses(llvm::ArrayRef<swift::SILFunctionTransform*>) 5363.0ms 20.7% 8.0 swift::SILPassManager::runPassesOnFunction(llvm::ArrayRef<swift::SILFunctionTransform*>, swift::SILFunction*) 1535.0ms 5.9% 1.0 (anonymous namespace)::ARCSequenceOpts::run() 789.0ms 3.0% 2.0 (anonymous namespace)::SimplifyCFGPass::run() 704.0ms 2.7% 0.0 (anonymous namespace)::SILCombine::run() 615.0ms 2.3% 36.0 (anonymous namespace)::SILCSE::run() 506.0ms 1.9% 14.0 (anonymous namespace)::RedundantLoadElimination::run() 224.0ms 0.8% 44.0 (anonymous namespace)::DCE::run() 150.0ms 0.5% 1.0 (anonymous namespace)::SILCodeMotion::run() 113.0ms 0.4% 1.0 (anonymous namespace)::StackPromotion::run() 98.0ms 0.3% 4.0 (anonymous namespace)::DeadStoreElimination::run() 80.0ms 0.3% 3.0 (anonymous namespace)::ABCOpt::run() 74.0ms 0.2% 5.0 (anonymous namespace)::LICM::run()