Commit d30af81e authored by ahaas's avatar ahaas Committed by Commit bot

[turbofan] Change the way nodes with multiple outputs are verified.

With the original implementation nodes which were not reachable from end
could cause the verification to fail.

R=titzer@chromium.org, mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/1782863002

Cr-Commit-Position: refs/heads/master@{#34683}
parent a42b2451
......@@ -135,6 +135,11 @@ void Verifier::Visitor::Check(Node* node) {
CheckOutput(value, node, value->op()->ValueOutputCount(), "value");
CHECK(IsDefUseChainLinkPresent(value, node));
CHECK(IsUseDefChainLinkPresent(value, node));
// Verify that only parameters and projections can have input nodes with
// multiple outputs.
CHECK(node->opcode() == IrOpcode::kParameter ||
node->opcode() == IrOpcode::kProjection ||
value->op()->ValueOutputCount() <= 1);
}
// Verify all context inputs are value nodes.
......@@ -161,16 +166,6 @@ void Verifier::Visitor::Check(Node* node) {
CHECK(IsUseDefChainLinkPresent(control, node));
}
// Verify all successors are projections if multiple value outputs exist.
if (node->op()->ValueOutputCount() > 1) {
for (Edge edge : node->use_edges()) {
Node* use = edge.from();
CHECK(!NodeProperties::IsValueEdge(edge) ||
use->opcode() == IrOpcode::kProjection ||
use->opcode() == IrOpcode::kParameter);
}
}
switch (node->opcode()) {
case IrOpcode::kStart:
// Start has no inputs.
......
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