aboutsummaryrefslogtreecommitdiffhomepage
path: root/ir/ir.c
diff options
context:
space:
mode:
Diffstat (limited to 'ir/ir.c')
-rw-r--r--ir/ir.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ir/ir.c b/ir/ir.c
index 2a5cde6..aa91f46 100644
--- a/ir/ir.c
+++ b/ir/ir.c
@@ -352,6 +352,7 @@ Shrink:
struct use *use = instruse[r.i];
instruse[r.i] = instrusebuf[r.i];
memcpy(instruse[r.i], use, sizeof *instrusebuf);
+ xbfree(use);
}
--instrnuse[r.i];
return 1;
@@ -448,6 +449,9 @@ delinstr(struct block *blk, int idx)
{
int t = blk->ins.p[idx];
assert(idx >= 0 && idx < blk->ins.n);
+ for (int i = 0; i < 2; ++i) {
+ deluse(blk, t, (&instrtab[t].l)[i]);
+ }
memcpy(&instrtab[t], &instrfreelist, sizeof(int));
instrfreelist = t;
deluses(t);