From ca928f6f8d18b4cf3acd1dd4b7443a5631c06af2 Mon Sep 17 00:00:00 2001 From: Roland Paterson-Jones Date: Tue, 22 Oct 2024 14:22:49 +0200 Subject: Blk::ins is a vector Scratching an itch - avoid unnecesary re-allocation in idup() which is called often in the optimisation chain. Blk::ins is reallocated in xxx_abi() - needs further fiddling. --- rv64/abi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rv64') diff --git a/rv64/abi.c b/rv64/abi.c index e31425c..20dc42c 100644 --- a/rv64/abi.c +++ b/rv64/abi.c @@ -601,7 +601,7 @@ rv64_abi(Fn *fn) break; p = selpar(fn, b->ins, i); n = b->nins - (i - b->ins) + (&insb[NIns] - curi); - i0 = alloc(n * sizeof(Ins)); + i0 = vnew(n, sizeof(Ins), PFn); ip = icpy(ip = i0, curi, &insb[NIns] - curi); ip = icpy(ip, i, &b->ins[b->nins] - i); b->nins = n; -- cgit v1.2.3