[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}
This commit is contained in:
ahaas 2016-03-10 07:37:48 -08:00 committed by Commit bot
parent a42b24514e
commit d30af81ecf

View File

@ -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.