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

Unified Diff: runtime/vm/compiler.cc

Issue 12260008: Reapply r18377 it was reverted due to the unrelated bug it surfaced. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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_builder.cc » ('j') | runtime/vm/flow_graph_type_propagator.h » ('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 babed804a61f71d152fcb7b1e501a4ec912e9656..ae0db89fb6bc98591a97edfa9fd7a8fa725917b5 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -21,6 +21,7 @@
#include "vm/flow_graph_compiler.h"
#include "vm/flow_graph_inliner.h"
#include "vm/flow_graph_optimizer.h"
+#include "vm/flow_graph_type_propagator.h"
#include "vm/il_printer.h"
#include "vm/longjump.h"
#include "vm/object.h"
@@ -53,7 +54,7 @@ DEFINE_FLAG(bool, verify_compiler, false,
DECLARE_FLAG(bool, print_flow_graph);
DECLARE_FLAG(bool, print_flow_graph_optimized);
DECLARE_FLAG(bool, trace_failed_optimization_attempts);
-
+DECLARE_FLAG(bool, trace_type_propagation);
// Compile a function. Should call only if the function has not been compiled.
// Arg0: function object.
@@ -190,15 +191,25 @@ static bool CompileParsedFunctionHelper(const ParsedFunction& parsed_function,
// Use lists are maintained and validated by the inliner.
}
+ if (FLAG_trace_type_propagation) {
+ OS::Print("Before type propagation:\n");
+ FlowGraphPrinter printer(*flow_graph);
+ printer.PrintBlocks();
+ }
+
// Propagate types and eliminate more type tests.
if (FLAG_propagate_types) {
FlowGraphTypePropagator propagator(flow_graph);
- propagator.PropagateTypes();
+ propagator.Propagate();
+ }
+
+ if (FLAG_trace_type_propagation) {
+ OS::Print("After type propagation:\n");
+ FlowGraphPrinter printer(*flow_graph);
+ printer.PrintBlocks();
}
- // Propagate sminess from CheckSmi to phis.
flow_graph->ComputeUseLists();
- optimizer.PropagateSminess();
// Use propagated class-ids to optimize further.
optimizer.ApplyClassIds();
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | runtime/vm/flow_graph_type_propagator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698