From 44c48feb56ad5b4facad32d643f132a5e154a0ed Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 28 Dec 2021 09:23:14 +0900 Subject: [PATCH] [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. --- tools/qfcc/source/dags.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/qfcc/source/dags.c b/tools/qfcc/source/dags.c index 202c9a51a..9e3b1cdab 100644 --- a/tools/qfcc/source/dags.c +++ b/tools/qfcc/source/dags.c @@ -659,7 +659,10 @@ dagnode_attach_label (dag_t *dag, dagnode_t *n, daglabel_t *l) 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_union (n->edges, node->parents); dagnode_set_reachable (dag, n); } l->live = 0; // remove live forcing on assignment