diff options
| author | 2025-11-12 18:01:36 +0100 | |
|---|---|---|
| committer | 2025-11-12 18:03:51 +0100 | |
| commit | d537bd34033cae0577da6e8c5ab19ffa7d311380 (patch) | |
| tree | 656273464f93fbc2feaefe2859c2b79c64ad91fb /ir | |
| parent | 85ddd0c5aa6e2e3306ca6574d83657466ba7aabd (diff) | |
ir: free uses
Diffstat (limited to 'ir')
| -rw-r--r-- | ir/ir.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); |