Commits

Xin Tong committed f5bd3eab49f
Optimize compilation time for RLE and DSE with respective to the new projection path. We do not need to trace from the accessed field to the base object when we've done it before in enumerateLSLOcations Stdlib -O === Before === Running Time Self (ms) Symbol Name 25137.0ms 37.3% 0.0 swift::runSILOptimizationPasses(swift::SILModule&) 24939.0ms 37.0% 0.0 swift::SILPassManager::runOneIteration() 20226.0ms 30.0% 29.0 swift::SILPassManager::runFunctionPasses(llvm::ArrayRef<swift::SILFunctionTransform*>) 19241.0ms 28.5% 83.0 swift::SILPassManager::runPassesOnFunction(llvm::ArrayRef<swift::SILFunctionTransform*>, swift::SILFunction*) 3214.0ms 4.7% 10.0 (anonymous namespace)::SimplifyCFGPass::run() 3005.0ms 4.4% 14.0 (anonymous namespace)::ARCSequenceOpts::run() 2438.0ms 3.6% 7.0 (anonymous namespace)::SILCombine::run() 2217.0ms 3.2% 54.0 (anonymous namespace)::RedundantLoadElimination::run() 2212.0ms 3.2% 131.0 (anonymous namespace)::SILCSE::run() 1195.0ms 1.7% 11.0 (anonymous namespace)::GenericSpecializer::run() 1168.0ms 1.7% 39.0 (anonymous namespace)::DeadStoreElimination::run() 853.0ms 1.2% 150.0 (anonymous namespace)::DCE::run() 499.0ms 0.7% 7.0 (anonymous namespace)::SILCodeMotion::run() === After === Running Time Self (ms) Symbol Name 22955.0ms 38.2% 0.0 swift::runSILOptimizationPasses(swift::SILModule&) 22777.0ms 37.9% 0.0 swift::SILPassManager::runOneIteration() 18447.0ms 30.7% 30.0 swift::SILPassManager::runFunctionPasses(llvm::ArrayRef<swift::SILFunctionTransform*>) 17510.0ms 29.1% 67.0 swift::SILPassManager::runPassesOnFunction(llvm::ArrayRef<swift::SILFunctionTransform*>, swift::SILFunction*) 2944.0ms 4.9% 5.0 (anonymous namespace)::SimplifyCFGPass::run() 2884.0ms 4.8% 12.0 (anonymous namespace)::ARCSequenceOpts::run() 2277.0ms 3.7% 1.0 (anonymous namespace)::SILCombine::run() 1951.0ms 3.2% 117.0 (anonymous namespace)::SILCSE::run() 1803.0ms 3.0% 54.0 (anonymous namespace)::RedundantLoadElimination::run() 1096.0ms 1.8% 10.0 (anonymous namespace)::GenericSpecializer::run() 911.0ms 1.5% 53.0 (anonymous namespace)::DeadStoreElimination::run() 795.0ms 1.3% 135.0 (anonymous namespace)::DCE::run() 453.0ms 0.7% 9.0 (anonymous namespace)::SILCodeMotion::run()