[qfcc] Add filename to dot output

It makes things so much easier when viewing the graphs
This commit is contained in:
Bill Currie 2020-03-06 21:05:53 +09:00
parent f0ecf7b30a
commit f7757cf894
4 changed files with 4 additions and 0 deletions

View file

@ -176,6 +176,7 @@ dot_dump_dag (void *_dag, const char *filename)
dstring_t *dstr = dstring_newstr();
dasprintf (dstr, "digraph dag_%p {\n", dag);
dasprintf (dstr, " graph [label=\"%s\"];\n", quote_string (filename));
dasprintf (dstr, " layout=dot;\n");
dasprintf (dstr, " clusterrank=local;\n");
dasprintf (dstr, " rankdir=TB;\n");

View file

@ -551,6 +551,7 @@ dump_dot_expr (void *_e, const char *filename)
expr_t *e = (expr_t *) _e;
dasprintf (dstr, "digraph expr_%p {\n", e);
dasprintf (dstr, " graph [label=\"%s\"];\n", quote_string (filename));
dasprintf (dstr, " layout=dot; rankdir=TB; compound=true;\n");
_print_expr (dstr, e, 0, ++id, 0);
dasprintf (dstr, "}\n");

View file

@ -332,6 +332,7 @@ print_flowgraph (flow_dot_t *method, flowgraph_t *graph, const char *filename)
dstring_t *dstr = dstring_newstr();
dasprintf (dstr, "digraph flowgraph_%s_%p {\n", method->type, graph);
dasprintf (dstr, " graph [label=\"%s\"];\n", quote_string (filename));
dasprintf (dstr, " layout=dot;\n");
dasprintf (dstr, " clusterrank=local;\n");
dasprintf (dstr, " rankdir=TB;\n");

View file

@ -128,6 +128,7 @@ print_sblock (sblock_t *sblock, const char *filename)
dstring_t *dstr = dstring_newstr();
dasprintf (dstr, "digraph sblock_%p {\n", sblock);
dasprintf (dstr, " graph [label=\"%s\"];\n", quote_string (filename));
dasprintf (dstr, " layout=dot; rankdir=TB;\n");
for (i = 0; sblock; sblock = sblock->next, i++)
flow_sblock (dstr, sblock, i);