[qfcc] Add attached node's parents to source edges

The assignment to the node's variable must come after any uses of that
node, which the node's parent set indicates. In the swap test, this was
not a problem as the node had no parents, and in the link order test, it
just happened(?) to work.
This commit is contained in:
Bill Currie 2021-12-28 09:23:14 +09:00
parent 5f4a330b02
commit 44c48feb56

View file

@ -659,7 +659,10 @@ dagnode_attach_label (dag_t *dag, dagnode_t *n, daglabel_t *l)
return 0; return 0;
} }
// this assignment to the variable must come after any previous uses,
// which includes itself and its parents
set_add (n->edges, node->number); set_add (n->edges, node->number);
set_union (n->edges, node->parents);
dagnode_set_reachable (dag, n); dagnode_set_reachable (dag, n);
} }
l->live = 0; // remove live forcing on assignment l->live = 0; // remove live forcing on assignment