Commit 7b0e02bc authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[turbofan] Thread feedback through common operator reducer

The common operator reducer was loosing feedback information
when replacing DeoptimizeIf/Unless with DeoptimizeUnless/If nodes.

Bug: v8:7127
Change-Id: I5d6f253ca9dfec04f4e7c8d1485f0ca668a8db95
Reviewed-on: https://chromium-review.googlesource.com/878781Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50782}
parent d2681aa4
......@@ -104,8 +104,8 @@ Reduction BranchElimination::ReduceDeoptimizeConditional(Node* node) {
ReplaceWithValue(node, dead(), effect, control);
} else {
control = graph()->NewNode(
common()->Deoptimize(p.kind(), p.reason(), VectorSlotPair()),
frame_state, effect, control);
common()->Deoptimize(p.kind(), p.reason(), p.feedback()), frame_state,
effect, control);
// TODO(bmeurer): This should be on the AdvancedReducer somehow.
NodeProperties::MergeControlToEnd(graph(), common(), control);
Revisit(graph()->end());
......
......@@ -138,10 +138,10 @@ Reduction CommonOperatorReducer::ReduceDeoptimizeConditional(Node* node) {
if (condition->opcode() == IrOpcode::kBooleanNot) {
NodeProperties::ReplaceValueInput(node, condition->InputAt(0), 0);
NodeProperties::ChangeOp(
node, condition_is_true ? common()->DeoptimizeIf(p.kind(), p.reason(),
VectorSlotPair())
: common()->DeoptimizeUnless(
p.kind(), p.reason(), VectorSlotPair()));
node,
condition_is_true
? common()->DeoptimizeIf(p.kind(), p.reason(), p.feedback())
: common()->DeoptimizeUnless(p.kind(), p.reason(), p.feedback()));
return Changed(node);
}
Decision const decision = DecideCondition(condition);
......@@ -150,8 +150,8 @@ Reduction CommonOperatorReducer::ReduceDeoptimizeConditional(Node* node) {
ReplaceWithValue(node, dead(), effect, control);
} else {
control = graph()->NewNode(
common()->Deoptimize(p.kind(), p.reason(), VectorSlotPair()),
frame_state, effect, control);
common()->Deoptimize(p.kind(), p.reason(), p.feedback()), frame_state,
effect, control);
// TODO(bmeurer): This should be on the AdvancedReducer somehow.
NodeProperties::MergeControlToEnd(graph(), common(), control);
Revisit(graph()->end());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment