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

Unified Diff: runtime/vm/branch_optimizer.cc

Issue 2904733003: Revert "Shuffle around deopt id allocation to give the flow graph builder a chance to record other … (Closed)
Patch Set: 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/aot_optimizer.cc ('k') | runtime/vm/constant_propagator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/branch_optimizer.cc
diff --git a/runtime/vm/branch_optimizer.cc b/runtime/vm/branch_optimizer.cc
index 0048b7ed637da3a17cc9cff4b85cb046595f6954..f68bbcaef3379903f93cec3ce13d18b07e604846 100644
--- a/runtime/vm/branch_optimizer.cc
+++ b/runtime/vm/branch_optimizer.cc
@@ -65,8 +65,8 @@ JoinEntryInstr* BranchSimplifier::ToJoinEntry(Zone* zone,
// Convert a target block into a join block. Branches will be duplicated
// so the former true and false targets become joins of the control flows
// from all the duplicated branches.
- JoinEntryInstr* join = new (zone) JoinEntryInstr(
- target->block_id(), target->try_index(), Thread::kNoDeoptId);
+ JoinEntryInstr* join =
+ new (zone) JoinEntryInstr(target->block_id(), target->try_index());
join->InheritDeoptTarget(zone, target);
join->LinkTo(target->next());
join->set_last_instruction(target->last_instruction());
@@ -82,8 +82,7 @@ BranchInstr* BranchSimplifier::CloneBranch(Zone* zone,
ComparisonInstr* comparison = branch->comparison();
ComparisonInstr* new_comparison =
comparison->CopyWithNewOperands(new_left, new_right);
- BranchInstr* new_branch =
- new (zone) BranchInstr(new_comparison, Thread::kNoDeoptId);
+ BranchInstr* new_branch = new (zone) BranchInstr(new_comparison);
return new_branch;
}
@@ -184,24 +183,20 @@ void BranchSimplifier::Simplify(FlowGraph* flow_graph) {
// Connect the branch to the true and false joins, via empty target
// blocks.
- TargetEntryInstr* true_target =
- new (zone) TargetEntryInstr(flow_graph->max_block_id() + 1,
- block->try_index(), Thread::kNoDeoptId);
+ TargetEntryInstr* true_target = new (zone) TargetEntryInstr(
+ flow_graph->max_block_id() + 1, block->try_index());
true_target->InheritDeoptTarget(zone, join_true);
- TargetEntryInstr* false_target =
- new (zone) TargetEntryInstr(flow_graph->max_block_id() + 2,
- block->try_index(), Thread::kNoDeoptId);
+ TargetEntryInstr* false_target = new (zone) TargetEntryInstr(
+ flow_graph->max_block_id() + 2, block->try_index());
false_target->InheritDeoptTarget(zone, join_false);
flow_graph->set_max_block_id(flow_graph->max_block_id() + 2);
*new_branch->true_successor_address() = true_target;
*new_branch->false_successor_address() = false_target;
- GotoInstr* goto_true =
- new (zone) GotoInstr(join_true, Thread::kNoDeoptId);
+ GotoInstr* goto_true = new (zone) GotoInstr(join_true);
goto_true->InheritDeoptTarget(zone, join_true);
true_target->LinkTo(goto_true);
true_target->set_last_instruction(goto_true);
- GotoInstr* goto_false =
- new (zone) GotoInstr(join_false, Thread::kNoDeoptId);
+ GotoInstr* goto_false = new (zone) GotoInstr(join_false);
goto_false->InheritDeoptTarget(zone, join_false);
false_target->LinkTo(goto_false);
false_target->set_last_instruction(goto_false);
@@ -300,9 +295,8 @@ void IfConverter::Simplify(FlowGraph* flow_graph) {
ComparisonInstr* new_comparison = comparison->CopyWithNewOperands(
comparison->left()->Copy(zone), comparison->right()->Copy(zone));
- IfThenElseInstr* if_then_else = new (zone)
- IfThenElseInstr(new_comparison, if_true->Copy(zone),
- if_false->Copy(zone), Thread::kNoDeoptId);
+ IfThenElseInstr* if_then_else = new (zone) IfThenElseInstr(
+ new_comparison, if_true->Copy(zone), if_false->Copy(zone));
flow_graph->InsertBefore(branch, if_then_else, NULL,
FlowGraph::kValue);
« no previous file with comments | « runtime/vm/aot_optimizer.cc ('k') | runtime/vm/constant_propagator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698