diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-10-06 22:51:51 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-10-06 22:51:51 -0400 |
commit | 72fc4559786dac5154ba344755758ba7a096be1b (patch) | |
tree | 424e25f3f99dbc2d00f4f6082ef10f0849917bf0 /lisc/ssa.c | |
parent | 99ad19546d983957d4bdb5596fc323a260d73fa6 (diff) | |
download | roux-72fc4559786dac5154ba344755758ba7a096be1b.tar.gz |
add pool memory management
Diffstat (limited to 'lisc/ssa.c')
-rw-r--r-- | lisc/ssa.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lisc/ssa.c b/lisc/ssa.c index e60edc0..46a6023 100644 --- a/lisc/ssa.c +++ b/lisc/ssa.c @@ -24,7 +24,6 @@ fillpreds(Fn *f) for (b=f->start; b; b=b->link) { b->npred = 0; - free(b->pred); b->pred = 0; } for (b=f->start; b; b=b->link) { @@ -74,7 +73,6 @@ fillrpo(Fn *f) b->id = -1; n = 1 + rporec(f->start, f->nblk-1); f->nblk -= n; - free(f->rpo); f->rpo = alloc(f->nblk * sizeof f->rpo[0]); for (p=&f->start; *p;) { b = *p; @@ -197,7 +195,6 @@ topdef(Blk *b, Fn *f, int w) void ssafix(Fn *f, int t) { - char s[NString]; uint n; int t0, t1, w; Ref rt; @@ -252,10 +249,6 @@ ssafix(Fn *f, int t) b->jmp.arg = topdef(b, f, w); } /* add new temporaries */ - for (t1=f->ntmp; t1<t0; t1++) { - snprintf(s, NString, "%s%d", f->tmp[t].name, t0-t1); - newtmp(s, f); - } - free(top); - free(bot); + for (t1=f->ntmp; t1<t0; t1++) + newtmp(f->tmp[t].name, f); } |