From 61d656881b514342b4de217244c9813f94cb6a53 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sat, 13 May 2023 21:13:52 +0900 Subject: [PATCH] [qfcc] Improve readability of flow vars in live I could never remember what any of the numbers meant. While define is still a little fuzzy (they're (pseudo)statement numbers), at least now I'll always know that the numbers are the define set. Also, having the flow address of the variable helps with understanding the reaching defs output. --- tools/qfcc/source/dot_flow.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/qfcc/source/dot_flow.c b/tools/qfcc/source/dot_flow.c index ecfbcc01f..62b7fc836 100644 --- a/tools/qfcc/source/dot_flow.c +++ b/tools/qfcc/source/dot_flow.c @@ -204,10 +204,18 @@ print_flow_vars (dstring_t *dstr, flowgraph_t *graph, int level) dasprintf (dstr, "%*sfv_%p [shape=none,label=<\n", indent, "", graph); dasprintf (dstr, "%*s\n", indent + 2, ""); + dasprintf (dstr, "%*s\n", + indent + 4, ""); + dasprintf (dstr, "%*s" + "\n", + indent + 4, ""); for (i = 0; i < graph->func->num_vars; i++) { var = graph->func->vars[i]; - dasprintf (dstr, "%*s\n", indent + 4, "", + dasprintf (dstr, "%*s" + "\n", + indent + 4, "", var->number, html_string(operand_string (var->op)), + var->flowaddr, set_as_string (var->define)); } dasprintf (dstr, "%*s
flow vars
#nameaddrdefine
(%d) %s %s
%d%s%d%s
>];\n", indent + 2, "");