Commit 0e4469fd authored by jarin's avatar jarin Committed by Commit bot

[turbofan] Rewire all control inputs in effect/control linearization.

Review-Url: https://codereview.chromium.org/1941353002
Cr-Commit-Position: refs/heads/master@{#35966}
parent 79688584
...@@ -328,13 +328,14 @@ void EffectControlLinearizer::ProcessNode(Node* node, Node** effect, ...@@ -328,13 +328,14 @@ void EffectControlLinearizer::ProcessNode(Node* node, Node** effect,
DCHECK(node->op()->EffectOutputCount() == 0 || DCHECK(node->op()->EffectOutputCount() == 0 ||
node->opcode() == IrOpcode::kStart); node->opcode() == IrOpcode::kStart);
} }
// Rewire control inputs of control nodes, and update the current control
// input. // Rewire control inputs.
for (int i = 0; i < node->op()->ControlInputCount(); i++) {
NodeProperties::ReplaceControlInput(node, *control, i);
}
// Update the current control and wire IfSuccess right after calls.
if (node->op()->ControlOutputCount() > 0) { if (node->op()->ControlOutputCount() > 0) {
DCHECK_EQ(1, node->op()->ControlInputCount());
NodeProperties::ReplaceControlInput(node, *control);
*control = node; *control = node;
if (node->opcode() == IrOpcode::kCall) { if (node->opcode() == IrOpcode::kCall) {
// Schedule the call's IfSuccess node (if there is no exception use). // Schedule the call's IfSuccess node (if there is no exception use).
TryScheduleCallIfSuccess(node, control); TryScheduleCallIfSuccess(node, control);
......
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