From e6fbab42185f4fb4e3a3b1e3e93eaa5d3d81b7c7 Mon Sep 17 00:00:00 2001 From: lemon Date: Sat, 20 Dec 2025 17:59:40 +0100 Subject: 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. --- ir/abi0.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'ir/abi0.c') diff --git a/ir/abi0.c b/ir/abi0.c index 1547722..bd8e297 100644 --- a/ir/abi0.c +++ b/ir/abi0.c @@ -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))}; -- cgit v1.2.3