mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
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:
parent
4f8b3b5692
commit
d0e56c91cc
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue