| Index: runtime/vm/flow_graph_optimizer.cc
|
| ===================================================================
|
| --- runtime/vm/flow_graph_optimizer.cc (revision 20931)
|
| +++ runtime/vm/flow_graph_optimizer.cc (working copy)
|
| @@ -21,6 +21,9 @@
|
|
|
| DEFINE_FLAG(bool, array_bounds_check_elimination, true,
|
| "Eliminate redundant bounds checks.");
|
| +// TODO(srdjan): Enable/remove flag once it works.
|
| +DEFINE_FLAG(bool, inline_getter_with_guarded_cid, false,
|
| + "Inline implict getter using guarded cid");
|
| DEFINE_FLAG(bool, load_cse, true, "Use redundant load elimination.");
|
| DEFINE_FLAG(int, max_polymorphic_checks, 4,
|
| "Maximum number of polymorphic check, otherwise it is megamorphic.");
|
| @@ -1208,10 +1211,14 @@
|
| call->RemoveEnvironment();
|
| ReplaceCall(call, load);
|
|
|
| - if (load->result_cid() != kDynamicCid) {
|
| - // Reset value types if guarded_cid was used.
|
| - for (Value::Iterator it(load->input_use_list()); !it.Done(); it.Advance()) {
|
| - it.Current()->SetReachingType(NULL);
|
| + if (FLAG_inline_getter_with_guarded_cid) {
|
| + if (load->result_cid() != kDynamicCid) {
|
| + // Reset value types if guarded_cid was used.
|
| + for (Value::Iterator it(load->input_use_list());
|
| + !it.Done();
|
| + it.Advance()) {
|
| + it.Current()->SetReachingType(NULL);
|
| + }
|
| }
|
| }
|
| }
|
|
|