diff options
| author | 2025-12-20 17:59:40 +0100 | |
|---|---|---|
| committer | 2025-12-20 19:31:50 +0100 | |
| commit | e6fbab42185f4fb4e3a3b1e3e93eaa5d3d81b7c7 (patch) | |
| tree | dba8dd1a91f532dd104dc1299b32e79babacb499 /ir/abi0.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/abi0.c')
| -rw-r--r-- | ir/abi0.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -246,13 +246,11 @@ patcharg(struct block *blk, int *icall, struct call *call, return 1; } } - -static struct abiarg abiargsbuf[32]; - void abi0_call(struct function *fn, struct instr *ins, struct block *blk, int *curi) { union ref retmem; + struct abiarg abiargsbuf[32]; struct abiargsvec abiargs = {VINIT(abiargsbuf, countof(abiargsbuf))}; bool sretarghidden = 0; int ni, nf, ns, vararg, nret = 0; @@ -361,6 +359,7 @@ abi0_call(struct function *fn, struct instr *ins, struct block *blk, int *curi) void abi0(struct function *fn) { + struct abiarg abiargsbuf[32]; uint nparam = typedata[fn->fnty.dat].nmemb; const union type *paramty = typedata[fn->fnty.dat].param; struct abiargsvec abiargs = {VINIT(abiargsbuf, countof(abiargsbuf))}; |