aboutsummaryrefslogtreecommitdiffhomepage
path: root/ir/regalloc.c
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-12-11 20:43:24 +0100
committerlemon <lsof@mailbox.org>2025-12-11 20:43:24 +0100
commit88652eeb10cd9381aafb2d55e9474bb0799630b1 (patch)
tree2ba02aa77ce8357e29ddb502aee18109a90bd136 /ir/regalloc.c
parent2bbdb7a6b8204ae3caa5235c4ba637834036a299 (diff)
rename arraylength macro -> countof
Diffstat (limited to 'ir/regalloc.c')
-rw-r--r--ir/regalloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ir/regalloc.c b/ir/regalloc.c
index cf40266..9abd3c6 100644
--- a/ir/regalloc.c
+++ b/ir/regalloc.c
@@ -82,7 +82,7 @@ fixlive(struct function *fn)
struct bitset definedbuf[4] = {0};
struct bitset *defined = definedbuf;
- if (BSSIZE(ninstr) >= arraylength(definedbuf))
+ if (BSSIZE(ninstr) >= countof(definedbuf))
defined = xcalloc(sizeof *defined * BSSIZE(ninstr));
npendingphi = 0;
@@ -1241,7 +1241,7 @@ regalloc(struct function *fn)
fn->regusage = 0;
fn->stksiz = alignup(fn->stksiz, 8);
fn->isleaf = 1;
- vinit(&stkslotrefs, stkslotrefsbuf, arraylength(stkslotrefsbuf));
+ vinit(&stkslotrefs, stkslotrefsbuf, countof(stkslotrefsbuf));
/* put into reverse post order */
sortrpo(fn);