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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 11343046: Fix equality instruction to switch from checked (polymorphic) to megamorphic state. This helps da… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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/intermediate_language.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.cc
===================================================================
--- runtime/vm/flow_graph_optimizer.cc (revision 14294)
+++ runtime/vm/flow_graph_optimizer.cc (working copy)
@@ -27,9 +27,11 @@
DEFINE_FLAG(bool, load_cse, true, "Use redundant load elimination.");
DEFINE_FLAG(bool, trace_range_analysis, false, "Trace range analysis progress");
DEFINE_FLAG(bool, trace_constant_propagation, false,
- "Print constant propagation and useless code elimination.");
+ "Print constant propagation and useless code elimination.");
DEFINE_FLAG(bool, array_bounds_check_elimination, true,
- "Eliminate redundant bounds checks.");
+ "Eliminate redundant bounds checks.");
+DEFINE_FLAG(int, max_polymorphic_checks, 4,
+ "Maximum number of polymorphic check, otherwise it is megamorphic.");
void FlowGraphOptimizer::ApplyICData() {
@@ -1157,8 +1159,7 @@
instr->ReplaceWith(call, current_iterator());
return;
}
- const intptr_t kMaxChecks = 4;
- if (instr->ic_data()->NumberOfChecks() <= kMaxChecks) {
+ if (instr->ic_data()->NumberOfChecks() <= FLAG_max_polymorphic_checks) {
bool call_with_checks;
if (unary_checks.HasOneTarget()) {
// Type propagation has not run yet, we cannot eliminate the check.
« no previous file with comments | « no previous file | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698