Index: runtime/vm/compiler.cc |
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc |
index 81ba5f3f1b18ee132c9ec68bf4a7d594c9c1765a..f75b09c63d1460360c1ed09ef9c3a14729b5800b 100644 |
--- a/runtime/vm/compiler.cc |
+++ b/runtime/vm/compiler.cc |
@@ -411,12 +411,24 @@ static bool CompileParsedFunctionHelper(ParsedFunction* parsed_function, |
DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
} |
+ // Optimistically convert loop phis that have a single non-smi input |
+ // comming from the loop pre-header into smi-phis. |
Florian Schneider
2014/08/27 09:36:50
s/comming/coming/
Vyacheslav Egorov (Google)
2014/08/27 11:45:36
Done.
|
+ if (FLAG_loop_invariant_code_motion) { |
+ LICM licm(flow_graph); |
+ licm.OptimisticallySpecializeSmiPhis(); |
+ DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
+ } |
+ |
// Propagate types and eliminate even more type tests. |
// Recompute types after constant propagation to infer more precise |
// types for uses that were previously reached by now eliminated phis. |
FlowGraphTypePropagator::Propagate(flow_graph); |
DEBUG_ASSERT(flow_graph->VerifyUseLists()); |
+ // Where beneficial convert Smi operations into Int32 operations. |
+ // Only meanigful for 32bit platforms right now. |
+ optimizer.WidenSmiToInt32(); |
+ |
// Unbox doubles. Performed after constant propagation to minimize |
// interference from phis merging double values and tagged |
// values coming from dead paths. |