From 44dd183d554c68946f417e2c0a8dea60a7648658 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 27 Dec 2021 14:15:51 +0900 Subject: [PATCH] [qfcc] Make it a little easier to see extra info instead of having to find an #if 0, just uncomment the define. --- tools/qfcc/source/dot_sblock.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/qfcc/source/dot_sblock.c b/tools/qfcc/source/dot_sblock.c index 80f292e61..eaca92300 100644 --- a/tools/qfcc/source/dot_sblock.c +++ b/tools/qfcc/source/dot_sblock.c @@ -54,6 +54,8 @@ #include "tools/qfcc/include/symtab.h" #include "tools/qfcc/include/type.h" +//#define SHOW_SETS + static void flow_statement (dstring_t *dstr, statement_t *s) { @@ -63,7 +65,7 @@ flow_statement (dstring_t *dstr, statement_t *s) dasprintf (dstr, "%s", html_string(operand_string (s->opa))); dasprintf (dstr, "%s", html_string(operand_string (s->opb))); dasprintf (dstr, "%s", html_string(operand_string (s->opc))); -#if 0 +#ifdef SHOW_SETS if (s->number >= 0) { set_t *use = set_new (); set_t *def = set_new (); @@ -106,6 +108,12 @@ dot_sblock (dstring_t *dstr, sblock_t *sblock, int blockno) for (l = sblock->labels; l; l = l->next) dasprintf (dstr, " %s(%d)\n", l->name, l->used); dasprintf (dstr, " \n"); +#ifdef SHOW_SETS + dasprintf (dstr, " use\n"); + dasprintf (dstr, " def\n"); + dasprintf (dstr, " kill\n"); + dasprintf (dstr, " ops\n"); +#endif dasprintf (dstr, " \n"); for (s = sblock->statements; s; s = s->next) flow_statement (dstr, s);