From 1183d443611e09e9364b89bd9ab2bcf53f1da133 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 19 Sep 2023 11:47:28 +0900 Subject: [PATCH] [qfcc] Skip dag dependency lines for leaf nodes Leaf nodes never generate code so showing lines to them only cluttered the displayed dag (they're still there internally, though). --- tools/qfcc/source/dot_dag.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/qfcc/source/dot_dag.c b/tools/qfcc/source/dot_dag.c index 9d6165a11..aa4c5a53f 100644 --- a/tools/qfcc/source/dot_dag.c +++ b/tools/qfcc/source/dot_dag.c @@ -119,9 +119,12 @@ print_node (dstring_t *dstr, dag_t *dag, dagnode_t *node) } for (edge_iter = set_first (edges); edge_iter; edge_iter = set_next (edge_iter)) { - dasprintf (dstr, - " \"dagnode_%p\" -> \"dagnode_%p\" [style=dashed];\n", - node, dag->nodes[edge_iter->element]); + auto n = dag->nodes[edge_iter->element]; + if (n->type != st_none) { + dasprintf (dstr, + " \"dagnode_%p\" -> \"dagnode_%p\" [style=dashed];\n", + node, n); + } } set_delete (edges); if (0) {