From 7404aacab78121bd289270a299aced170a4b44c8 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 5 Nov 2012 15:22:38 +0900 Subject: [PATCH] Resurrect dags building and printing. However, this time it's done after the statement recording (so the statement numbers are set). --- tools/qfcc/source/flow.c | 4 ++++ tools/qfcc/source/statements.c | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/qfcc/source/flow.c b/tools/qfcc/source/flow.c index b2caa4e0c..87e17bf56 100644 --- a/tools/qfcc/source/flow.c +++ b/tools/qfcc/source/flow.c @@ -45,6 +45,7 @@ #include "def.h" #include "flow.h" #include "function.h" +#include "options.h" #include "qfcc.h" #include "set.h" #include "statements.h" @@ -220,7 +221,10 @@ flow_build_vars (function_t *func) for (sblock = func->sblock; sblock; sblock = sblock->next) { for (s = sblock->statements; s; s = s->next) func->statements[s->number] = s; + sblock->dag = make_dag (sblock); } + if (options.block_dot.dags) + dump_sblock (func->sblock, "dags"); } } diff --git a/tools/qfcc/source/statements.c b/tools/qfcc/source/statements.c index ead0eeac2..e2ed83535 100644 --- a/tools/qfcc/source/statements.c +++ b/tools/qfcc/source/statements.c @@ -1403,9 +1403,5 @@ make_statements (expr_t *e) if (options.block_dot.final) dump_sblock (sblock, "final"); - //for (s = sblock; s; s = s->next) - // s->dag = make_dag (s); - //if (options.block_dot.dags) - // dump_sblock (sblock, "dags"); return sblock; }