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

Unified Diff: runtime/vm/constant_propagator.cc

Issue 2896903002: Shuffle around deopt id allocation to give the flow graph builder a chance to record other data as … (Closed)
Patch Set: format 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
Index: runtime/vm/constant_propagator.cc
diff --git a/runtime/vm/constant_propagator.cc b/runtime/vm/constant_propagator.cc
index 050c0ba2a99606affbf530fab27dbd375b478f8f..718623faa44992dcff359246fc1b1816ff582dd3 100644
--- a/runtime/vm/constant_propagator.cc
+++ b/runtime/vm/constant_propagator.cc
@@ -1548,7 +1548,8 @@ void ConstantPropagator::EliminateRedundantBranches() {
// Drop the comparison, which does not have side effects
JoinEntryInstr* join = if_true->AsJoinEntry();
if (join->phis() == NULL) {
- GotoInstr* jump = new (Z) GotoInstr(if_true->AsJoinEntry());
+ GotoInstr* jump = new (Z) GotoInstr(
+ if_true->AsJoinEntry(), Thread::Current()->GetNextDeoptId());
Vyacheslav Egorov (Google) 2017/05/23 12:00:01 kNoDeoptId because InheritDeoptTarget.
jump->InheritDeoptTarget(Z, branch);
Instruction* previous = branch->previous();
@@ -1692,15 +1693,16 @@ void ConstantPropagator::Transform() {
ASSERT(if_false->parallel_move() == NULL);
ASSERT(if_false->loop_info() == NULL);
join =
- new (Z) JoinEntryInstr(if_false->block_id(), if_false->try_index());
+ new (Z) JoinEntryInstr(if_false->block_id(), if_false->try_index(),
+ Thread::Current()->GetNextDeoptId());
Vyacheslav Egorov (Google) 2017/05/23 12:00:01 ditto
join->InheritDeoptTarget(Z, if_false);
if_false->UnuseAllInputs();
next = if_false->next();
} else if (!reachable_->Contains(if_false->preorder_number())) {
ASSERT(if_true->parallel_move() == NULL);
ASSERT(if_true->loop_info() == NULL);
- join =
- new (Z) JoinEntryInstr(if_true->block_id(), if_true->try_index());
+ join = new (Z) JoinEntryInstr(if_true->block_id(), if_true->try_index(),
Vyacheslav Egorov (Google) 2017/05/23 12:00:01 ditto
+ Thread::Current()->GetNextDeoptId());
join->InheritDeoptTarget(Z, if_true);
if_true->UnuseAllInputs();
next = if_true->next();
@@ -1711,7 +1713,8 @@ void ConstantPropagator::Transform() {
// Drop the comparison, which does not have side effects as long
// as it is a strict compare (the only one we can determine is
// constant with the current analysis).
- GotoInstr* jump = new (Z) GotoInstr(join);
+ GotoInstr* jump =
+ new (Z) GotoInstr(join, Thread::Current()->GetNextDeoptId());
Vyacheslav Egorov (Google) 2017/05/23 12:00:01 ditto
jump->InheritDeoptTarget(Z, branch);
Instruction* previous = branch->previous();

Powered by Google App Engine
This is Rietveld 408576698