Commits

Xin Tong committed ba40b3f1a7d
Take a more displined approach in DSE as to how to a function is optimized. Now we have 3 cases. 1. OptimizeNone (for functions with too many basicblocks and too many locations). Simply return. 2. Pessimisitc single iteration data flow (for functions with many basic blocks and many locations). 3. Optimistic multiple iteration data flow (for functions with some basic blocks and some locations and require iterative data flow). With this change stdlib and stdlibunittest has some changes in dead store(DS) eliminated. stdlib: 202 -> 203 DS. stdlibunittest: 42 - 39 DS. Compilation time improvement: with this change on a RELEASE+ASSERT compiler for stdlibunittest. Running Time Self (ms) Symbol Name 5525.0ms 5.3% 25.0 (anonymous namespace)::ARCSequenceOpts::run() 3500.0ms 3.4% 25.0 (anonymous namespace)::RedundantLoadElimination::run() 3050.0ms 2.9% 25.0 (anonymous namespace)::SILCombine::run() 2700.0ms 2.6% 0.0 (anonymous namespace)::SimplifyCFGPass::run() 2100.0ms 2.0% 75.0 (anonymous namespace)::SILCSE::run() 1450.0ms 1.4% 0.0 (anonymous namespace)::DeadStoreElimination::run() 750.0ms 0.7% 75.0 (anonymous namespace)::DCE::run() Compilation time improvement: with this change on a DEBUG compiler for stdlibunittest. Running Time Self (ms) Symbol Name 42300.0ms 4.9% 50.0 (anonymous namespace)::ARCSequenceOpts::run() 35875.0ms 4.1% 0.0 (anonymous namespace)::RedundantLoadElimination::run() 30475.0ms 3.5% 0.0 (anonymous namespace)::SILCombine::run() 19675.0ms 2.3% 0.0 (anonymous namespace)::SILCSE::run() 18150.0ms 2.1% 25.0 (anonymous namespace)::SimplifyCFGPass::run() 12475.0ms 1.4% 0.0 (anonymous namespace)::DeadStoreElimination::run() 5775.0ms 0.6% 0.0 (anonymous namespace)::DCE::run() I do not see a compilation time change in stdlib. Existing tests ensure correctness.