summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisc/main.c13
-rw-r--r--lisc/spill.c8
2 files changed, 12 insertions, 9 deletions
diff --git a/lisc/main.c b/lisc/main.c
index 607e5e5..bda7d90 100644
--- a/lisc/main.c
+++ b/lisc/main.c
@@ -2,7 +2,7 @@
char debug['Z'+1] = {
- ['S'] = 1, /* spiller */
+ ['S'] = 0, /* spiller */
};
void
@@ -11,7 +11,7 @@ dumpss(Bits *b, Sym *s, FILE *f)
int t;
fprintf(f, "[");
- for (t=Tmp0; t<BITS*NBit; t++)
+ for (t=0; t<BITS*NBit; t++)
if (BGET(*b, t))
fprintf(f, " %s", s[t].name);
fprintf(f, " ]\n");
@@ -75,21 +75,16 @@ main(int ac, char *av[])
break;
}
case 's': {
- int t;
Blk *b;
fprintf(stderr, "[Testing Spilling]\n");
+ debug['S'] = 1;
fillrpo(fn);
fillpreds(fn);
filllive(fn);
fillcost(fn);
- printf("> Spill costs:\n");
- for (t=Tmp0; t<fn->ntmp; t++)
- printf("\t%-10s %d\n",
- fn->sym[t].name,
- fn->sym[t].cost);
spill(fn);
- printf("\n> Block information:\n");
+ printf("> Block information:\n");
for (b=fn->start; b; b=b->link) {
printf("\t%-10s (% 5d) ",
b->name, b->loop);
diff --git a/lisc/spill.c b/lisc/spill.c
index 26b1c5a..ce40075 100644
--- a/lisc/spill.c
+++ b/lisc/spill.c
@@ -111,6 +111,14 @@ fillcost(Fn *fn)
}
symuse(b->jmp.arg, 1, n, fn);
}
+ if (debug['S']) {
+ fprintf(stderr, "> Spill costs:\n");
+ for (n=Tmp0; n<fn->ntmp; n++)
+ fprintf(stderr, "\t%-10s %d\n",
+ fn->sym[n].name,
+ fn->sym[n].cost);
+ fprintf(stderr, "\n");
+ }
}
int