From e54898fdc8fcab3dedeaf09f93687b0c1182fe1f Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 13 Apr 2026 15:08:40 -0400 Subject: [PATCH] jay: tweak roundrobin Totals: Instrs: 2809726 -> 2807560 (-0.08%); split: -0.39%, +0.31% CodeSize: 45085472 -> 45051536 (-0.08%); split: -0.41%, +0.33% Totals from 2229 (84.21% of 2647) affected shaders: Instrs: 2726162 -> 2723996 (-0.08%); split: -0.40%, +0.32% CodeSize: 43775120 -> 43741184 (-0.08%); split: -0.42%, +0.34% Signed-off-by: Alyssa Rosenzweig Part-of: --- src/intel/compiler/jay/jay_register_allocate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/intel/compiler/jay/jay_register_allocate.c b/src/intel/compiler/jay/jay_register_allocate.c index 561581fb943..d9bfe1c947a 100644 --- a/src/intel/compiler/jay/jay_register_allocate.c +++ b/src/intel/compiler/jay/jay_register_allocate.c @@ -768,8 +768,9 @@ pick_regs(jay_ra_state *ra, assert(alignment >= size && "alignment must be a multiple of size"); unsigned nr = DIV_ROUND_UP((end + 1 - size - first), alignment); - unsigned roundrobin = (ra->roundrobin[file]++) % nr; + unsigned roundrobin = (ra->roundrobin[file]) % nr; unsigned rr_al = roundrobin * alignment, nr_al = nr * alignment; + ra->roundrobin[file] += size; for (unsigned i = rr_al; i < rr_al + nr_al; i += alignment) { /* We select registers roundrobin. This has several benefits: