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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 1203773002: Disable guessing 'other' cid; this prevents an issue in range analysis. It is not clear if guessing… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: s Created 5 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 | « runtime/vm/flow_graph_compiler.cc ('k') | tests/corelib/corelib.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.cc
diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
index 09859de4d156b6aa43e87b52ab72f8862ad4423b..c8378b7923536f01bb51c5d50f74ca18c6966911 100644
--- a/runtime/vm/flow_graph_optimizer.cc
+++ b/runtime/vm/flow_graph_optimizer.cc
@@ -27,6 +27,11 @@ namespace dart {
DEFINE_FLAG(int, getter_setter_ratio, 13,
"Ratio of getter/setter usage used for double field unboxing heuristics");
+// Setting 'guess_other_cid' to true causes issue 23693 crash.
+// TODO(srdjan): Evaluate if that optimization is wrong.
+DEFINE_FLAG(bool, guess_other_cid, false,
+ "Artificially create type feedback for arithmetic etc. operations"
+ " by guessing the other unknown argument cid");
DEFINE_FLAG(bool, load_cse, true, "Use redundant load elimination.");
DEFINE_FLAG(bool, dead_store_elimination, true, "Eliminate dead stores");
DEFINE_FLAG(int, max_polymorphic_checks, 4,
@@ -196,7 +201,9 @@ bool FlowGraphOptimizer::TryCreateICData(InstanceCallInstr* call) {
Token::IsBinaryOperator(op_kind)) {
// Guess cid: if one of the inputs is a number assume that the other
// is a number of same type.
- if (Compiler::guess_other_cid()) {
+ // Issue 23693. It is potentially wrong to assign types here that may
+ // conflict with other graph analysis.
+ if (FLAG_guess_other_cid) {
const intptr_t cid_0 = class_ids[0];
const intptr_t cid_1 = class_ids[1];
if ((cid_0 == kDynamicCid) && (IsNumberCid(cid_1))) {
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | tests/corelib/corelib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698