| Index: runtime/vm/compiler.cc
|
| ===================================================================
|
| --- runtime/vm/compiler.cc (revision 23898)
|
| +++ runtime/vm/compiler.cc (working copy)
|
| @@ -406,6 +406,13 @@
|
| flow_graph->RemoveRedefinitions();
|
|
|
| if (FLAG_range_analysis) {
|
| + if (FLAG_propagate_types) {
|
| + // Propagate types after store-load-forwarding. Some phis may have
|
| + // become smi phis that can be processed by range analysis.
|
| + FlowGraphTypePropagator propagator(flow_graph);
|
| + propagator.Propagate();
|
| + DEBUG_ASSERT(flow_graph->VerifyUseLists());
|
| + }
|
| // We have to perform range analysis after LICM because it
|
| // optimistically moves CheckSmi through phis into loop preheaders
|
| // making some phis smi.
|
| @@ -420,7 +427,6 @@
|
| DEBUG_ASSERT(flow_graph->VerifyUseLists());
|
| }
|
|
|
| - // The final canonicalization pass before the code generation.
|
| if (FLAG_propagate_types) {
|
| // Recompute types after code movement was done to ensure correct
|
| // reaching types for hoisted values.
|
| @@ -447,7 +453,7 @@
|
|
|
| // Ensure that all phis inserted by optimization passes have consistent
|
| // representations.
|
| - optimizer.UnboxPhis();
|
| + optimizer.SelectRepresentations();
|
|
|
| if (optimizer.Canonicalize()) {
|
| // To fully remove redundant boxing (e.g. BoxDouble used only in
|
|
|