mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Make flow_find_dominators a little more robust.
While a non-initial node not having predecessors is really an internal error, segfaulting because of it is not nice.
This commit is contained in:
parent
acde6ca0a0
commit
acc3beb6ab
1 changed files with 3 additions and 3 deletions
|
@ -332,9 +332,9 @@ flow_find_dominators (flowgraph_t *graph)
|
|||
for (i = 1; i < graph->num_nodes; i++) {
|
||||
node = graph->nodes[i];
|
||||
pred = set_first (node->predecessors);
|
||||
if (pred)
|
||||
set_assign (work, graph->nodes[pred->member]->dom);
|
||||
for (pred = set_next (pred); pred; pred = set_next (pred))
|
||||
set_empty (work);
|
||||
for (pred = set_first (node->predecessors); pred;
|
||||
pred = set_next (pred))
|
||||
set_intersection (work, graph->nodes[pred->member]->dom);
|
||||
set_add (work, i);
|
||||
if (!set_is_equivalent (work, node->dom))
|
||||
|
|
Loading…
Reference in a new issue