[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/878781
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50782}
This commit is contained in:
Sigurd Schneider 2018-01-22 16:47:52 +01:00 committed by Commit Bot
parent d2681aa448
commit 7b0e02bc77
2 changed files with 8 additions and 8 deletions

View File

@ -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());

View File

@ -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());