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

Unified Diff: runtime/vm/compiler.cc

Issue 16813002: Make constant propagation to fold x == x and re-run type propagation for better range analysis. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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/flow_graph_optimizer.h » ('j') | runtime/vm/flow_graph_optimizer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
===================================================================
--- runtime/vm/compiler.cc (revision 23800)
+++ 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
« no previous file with comments | « no previous file | runtime/vm/flow_graph_optimizer.h » ('j') | runtime/vm/flow_graph_optimizer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698