aboutsummaryrefslogtreecommitdiff
path: root/amd64
diff options
context:
space:
mode:
authorRoland Paterson-Jones <[email protected]>2024-10-22 14:22:49 +0200
committerQuentin Carbonneaux <[email protected]>2025-03-14 09:47:05 +0100
commitca928f6f8d18b4cf3acd1dd4b7443a5631c06af2 (patch)
tree9eedbe65cc60f271a3ec12623b36cbcd68117815 /amd64
parent024dffac8bbfa709ed3aed53d14b235e67047490 (diff)
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.
Diffstat (limited to 'amd64')
-rw-r--r--amd64/sysv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/amd64/sysv.c b/amd64/sysv.c
index 5b559c1..ba4dc8e 100644
--- a/amd64/sysv.c
+++ b/amd64/sysv.c
@@ -670,7 +670,7 @@ amd64_sysv_abi(Fn *fn)
break;
fa = 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;