diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-04-09 09:38:20 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-04-09 09:38:20 -0400 |
commit | 081360df6a06979852de977a4d4e56f3c4481a81 (patch) | |
tree | da157a4c09cec3215de04ee46d2288955ff1587f /fold.c | |
parent | 717524d4a38eea59c0f561a88312d8b07367fa94 (diff) | |
download | roux-081360df6a06979852de977a4d4e56f3c4481a81.tar.gz |
nicer debug info
Diffstat (limited to 'fold.c')
-rw-r--r-- | fold.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fold.c b/fold.c index a66755e..c8466e4 100644 --- a/fold.c +++ b/fold.c @@ -167,7 +167,7 @@ fold(Fn *fn) Blk *b, **pb; Phi *p, **pp; Ins *i; - int n, l; + int n, l, d; val = emalloc(fn->ntmp * sizeof val[0]); edge = emalloc(fn->nblk * sizeof edge[0]); @@ -244,12 +244,14 @@ fold(Fn *fn) else printref(CON(val[n]), fn, stderr); } - fprintf(stderr, "\n\n> Dead blocks:\n\t"); + fprintf(stderr, "\n%10s: ", "dead!"); } /* 2. trim dead code, replace constants */ + d = 0; for (pb=&fn->start; (b=*pb);) { if (b->visit == 0) { + d = 1; if (debug['F']) fprintf(stderr, "%s ", b->name); // blkdel(pb); @@ -289,6 +291,8 @@ fold(Fn *fn) } if (debug['F']) { + if (!d) + fprintf(stderr, "(none)"); fprintf(stderr, "\n\n> After folding:\n"); printfn(fn, stderr); } |