summaryrefslogtreecommitdiff
path: root/opt
diff options
context:
space:
mode:
authorOri Bernstein <orib@google.com>2012-06-11 13:29:55 -0400
committerOri Bernstein <orib@google.com>2012-06-11 13:29:55 -0400
commitcb4e2d4b69b663b99271bd4b29efceb873603f53 (patch)
tree212cb863496935ef0977dc7a69a11f68872bc128 /opt
parentac3035a2c5d8b9580a81852ec9493831b6e13e27 (diff)
downloadmc-cb4e2d4b69b663b99271bd4b29efceb873603f53.tar.gz
Print labels correctly.
Diffstat (limited to 'opt')
-rw-r--r--opt/df.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/opt/df.c b/opt/df.c
index 8981328..4f77934 100644
--- a/opt/df.c
+++ b/opt/df.c
@@ -118,7 +118,13 @@ void dumpcfg(Cfg *cfg, FILE *fd)
for (j = 0; j < cfg->nbb; j++) {
bb = cfg->bb[j];
fprintf(fd, "\n");
- fprintf(fd, "Bb: %d\n", bb->id);
+ fprintf(fd, "Bb: %d labels=(", bb->id);
+ sep = "";
+ for (i = 0; i < bb->nlbls; i++) {
+ fprintf(fd, "%s%s", bb->lbls[i], sep);
+ sep = ",";
+ }
+ fprintf(fd, ")\n");
/* in edges */
fprintf(fd, "In: ");
@@ -134,7 +140,7 @@ void dumpcfg(Cfg *cfg, FILE *fd)
fprintf(fd, "Out: ");
sep = "";
for (i = 0; i < bsmax(bb->out); i++) {
- if (bshas(bb->in, i)) {
+ if (bshas(bb->out, i)) {
fprintf(fd, "%d%s", i, sep);
sep = ",";
}