| Index: runtime/vm/compiler.cc
|
| ===================================================================
|
| --- runtime/vm/compiler.cc (revision 35904)
|
| +++ runtime/vm/compiler.cc (working copy)
|
| @@ -438,12 +438,8 @@
|
| }
|
| }
|
|
|
| - // Optimize (a << b) & c patterns, merge operations.
|
| - // Run after CSE in order to have more opportunity to merge
|
| - // instructions that have same inputs.
|
| - optimizer.TryOptimizePatterns();
|
| - DEBUG_ASSERT(flow_graph->VerifyUseLists());
|
| -
|
| + // Run loop-invariant code motion right after load elimination since it
|
| + // depends on the numbering of loads from the previous load-elimination.
|
| if (FLAG_loop_invariant_code_motion) {
|
| LICM licm(flow_graph);
|
| licm.Optimize();
|
| @@ -451,6 +447,14 @@
|
| }
|
| flow_graph->RemoveRedefinitions();
|
|
|
| + // Optimize (a << b) & c patterns, merge operations.
|
| + // Run after CSE in order to have more opportunity to merge
|
| + // instructions that have same inputs.
|
| + optimizer.TryOptimizePatterns();
|
| + DEBUG_ASSERT(flow_graph->VerifyUseLists());
|
| +
|
| + DeadStoreElimination::Optimize(flow_graph);
|
| +
|
| if (FLAG_range_analysis) {
|
| // Propagate types after store-load-forwarding. Some phis may have
|
| // become smi phis that can be processed by range analysis.
|
|
|