Detect non-initial nodes with no predecessors.

Such nodes are unreachable code (ie, dead blocks), but the dead block
removal code failed to remove them (current known cause: miscounted label
userrs). As such blocks cause problems for data flow analysis, ignoring
them is not a good idea. Thus make them an internal error.
This commit is contained in:
Bill Currie 2012-11-24 21:39:02 +09:00
parent 4f8b3b5692
commit d0e56c91cc

View file

@ -855,6 +855,11 @@ flow_find_predecessors (flowgraph_t *graph)
set_add (graph->nodes[succ->member]->predecessors, i);
}
}
for (i = 1; i < graph->num_nodes; i++) {
node = graph->nodes[i];
if (set_is_empty (node->predecessors))
internal_error (0, "non-initial node with no predecessors");
}
}
static void