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 <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40960>
This commit is contained in:
Alyssa Rosenzweig 2026-04-13 15:08:40 -04:00 committed by Marge Bot
parent 8aeeaa4d85
commit e54898fdc8

View file

@ -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: