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

Unified Diff: runtime/vm/flow_graph.cc

Issue 2891113002: Use same range info when emitting code and computing if instruction can deopt. (Closed)
Patch Set: Add a comment to the test Created 3 years, 7 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/constant_propagator.cc ('k') | runtime/vm/flow_graph_range_analysis.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph.cc
diff --git a/runtime/vm/flow_graph.cc b/runtime/vm/flow_graph.cc
index 84b9e483e42517457bd48e6b7bce6e65207ac959..2ca8a1606617f45dd64fe9d50b4abed671e0780d 100644
--- a/runtime/vm/flow_graph.cc
+++ b/runtime/vm/flow_graph.cc
@@ -2280,20 +2280,18 @@ void FlowGraph::TryMergeTruncDivMod(
(*merge_candidates)[k] = NULL; // Clear it.
ASSERT(curr_instr->HasUses());
AppendExtractNthOutputForMerged(
- curr_instr, MergedMathInstr::OutputIndexOf(curr_instr->op_kind()),
+ curr_instr, TruncDivModInstr::OutputIndexOf(curr_instr->op_kind()),
kTagged, kSmiCid);
ASSERT(other_binop->HasUses());
AppendExtractNthOutputForMerged(
- other_binop, MergedMathInstr::OutputIndexOf(other_binop->op_kind()),
- kTagged, kSmiCid);
-
- ZoneGrowableArray<Value*>* args = new (Z) ZoneGrowableArray<Value*>(2);
- args->Add(new (Z) Value(curr_instr->left()->definition()));
- args->Add(new (Z) Value(curr_instr->right()->definition()));
+ other_binop,
+ TruncDivModInstr::OutputIndexOf(other_binop->op_kind()), kTagged,
+ kSmiCid);
// Replace with TruncDivMod.
- MergedMathInstr* div_mod = new (Z) MergedMathInstr(
- args, curr_instr->deopt_id(), MergedMathInstr::kTruncDivMod);
+ TruncDivModInstr* div_mod = new (Z) TruncDivModInstr(
+ curr_instr->left()->CopyWithType(),
+ curr_instr->right()->CopyWithType(), curr_instr->deopt_id());
curr_instr->ReplaceWith(div_mod, NULL);
other_binop->ReplaceUsesWith(div_mod);
other_binop->RemoveFromGraph();
« no previous file with comments | « runtime/vm/constant_propagator.cc ('k') | runtime/vm/flow_graph_range_analysis.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698