diff options
| author | 2025-12-20 17:59:40 +0100 | |
|---|---|---|
| committer | 2025-12-20 19:31:50 +0100 | |
| commit | e6fbab42185f4fb4e3a3b1e3e93eaa5d3d81b7c7 (patch) | |
| tree | dba8dd1a91f532dd104dc1299b32e79babacb499 /ir/simpl.c | |
| parent | a5009ae762541c29e9a123bf70877261db4ff628 (diff) | |
backend: unify pass memory allocation strategies
It was all over the place for temporary data structures used by
individual passes. Now there is an arena specifically for that, which is
nicer.
Diffstat (limited to 'ir/simpl.c')
| -rw-r--r-- | ir/simpl.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -70,7 +70,7 @@ simpl(struct function *fn) FREQUIRE(FNUSE); int inschange = 0, blkchange = 0; - struct block **jmpfinal = xcalloc(fn->nblk * sizeof *jmpfinal); + struct block **jmpfinal = allocz(fn->passarena, fn->nblk * sizeof *jmpfinal, 0); struct block *blk = fn->entry; do { @@ -140,7 +140,6 @@ simpl(struct function *fn) } while ((blk = blk->lnext) != fn->entry); fillpreds(fn); } - free(jmpfinal); } /* vim:set ts=3 sw=3 expandtab: */ |