Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Unified Diff: runtime/vm/compiler.cc

Issue 504143003: Support Int32 representation for selected binary operations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/deopt_instructions.h » ('j') | runtime/vm/deopt_instructions.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index 81ba5f3f1b18ee132c9ec68bf4a7d594c9c1765a..b78f0c721e3f150f1886e345fd73a9ffdd25ff08 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
+ // coming from the loop pre-header into smi-phis.
+ 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.
« no previous file with comments | « no previous file | runtime/vm/deopt_instructions.h » ('j') | runtime/vm/deopt_instructions.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698