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

Unified Diff: runtime/vm/flow_graph_type_propagator.cc

Issue 1289933002: Trace CHA optimizations (where, when, why) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: s Created 5 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 | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/il_printer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_type_propagator.cc
diff --git a/runtime/vm/flow_graph_type_propagator.cc b/runtime/vm/flow_graph_type_propagator.cc
index 6fcd8742810a6c0c34c74da5a31903bb2f6ad781..f0ac5a6a530f8d27b4b085cf4758efb9dbc6e461 100644
--- a/runtime/vm/flow_graph_type_propagator.cc
+++ b/runtime/vm/flow_graph_type_propagator.cc
@@ -15,6 +15,7 @@ DEFINE_FLAG(bool, trace_type_propagation, false,
"Trace flow graph type propagation");
DECLARE_FLAG(bool, propagate_types);
+DECLARE_FLAG(bool, trace_cha);
DECLARE_FLAG(bool, use_cha_deopt);
@@ -549,6 +550,10 @@ intptr_t CompileType::ToNullableCid() {
// Type of a private class cannot change through later loaded libs.
cid_ = type_class.id();
} else if (FLAG_use_cha_deopt) {
+ if (FLAG_trace_cha) {
+ ISL_Print(" **(CHA) Compile type not subclassed: %s\n",
+ type_class.ToCString());
+ }
cha->AddToLeafClasses(type_class);
cid_ = type_class.id();
} else {
@@ -786,6 +791,11 @@ CompileType ParameterInstr::ComputeType() const {
cid = type_class.id();
} else {
if (FLAG_use_cha_deopt) {
+ if (FLAG_trace_cha) {
+ ISL_Print(" **(CHA) Computing exact type of parameters, "
+ "no subclasses: %s\n",
+ type_class.ToCString());
+ }
thread->cha()->AddToLeafClasses(type_class);
cid = type_class.id();
}
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/il_printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698