broadcom/compiler: only assign rf0 as last resort in V3D 7.x
authorIago Toral Quiroga <itoral@igalia.com>
Mon, 15 May 2023 08:02:10 +0000 (10:02 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 13 Oct 2023 22:37:42 +0000 (22:37 +0000)
commit1f5a3391bbf8bb5f2bef047ddfcf08e6aa5f5794
tree0006d2d94dcad7343142e777b3dac39cbb888d84
parentc8e4ee8ecbff817479c442b83c61fefeccf01f2c
broadcom/compiler: only assign rf0 as last resort in V3D 7.x

So we can use it for ldunif(a) and avoid generating ldunif(a)rf which
can't be paired with conditional instructions.

shader-db (pi5):

total instructions in shared programs: 11357802 -> 11338883 (-0.17%)
instructions in affected programs: 7117889 -> 7098970 (-0.27%)
helped: 24264
HURT: 17574
Instructions are helped.

total uniforms in shared programs: 3857808 -> 3857815 (<.01%)
uniforms in affected programs: 92 -> 99 (7.61%)
helped: 0
HURT: 1

total max-temps in shared programs: 2230904 -> 2230199 (-0.03%)
max-temps in affected programs: 52309 -> 51604 (-1.35%)
helped: 1219
HURT: 725
Max-temps are helped.

total sfu-stalls in shared programs: 15021 -> 15236 (1.43%)
sfu-stalls in affected programs: 6848 -> 7063 (3.14%)
helped: 1866
HURT: 1704
Inconclusive result

total inst-and-stalls in shared programs: 11372823 -> 11354119 (-0.16%)
inst-and-stalls in affected programs: 7149177 -> 7130473 (-0.26%)
helped: 24315
HURT: 17561
Inst-and-stalls are helped.

total nops in shared programs: 273624 -> 273711 (0.03%)
nops in affected programs: 31562 -> 31649 (0.28%)
helped: 1619
HURT: 1854
Inconclusive result (value mean confidence interval includes 0).

Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
src/broadcom/compiler/vir_register_allocate.c