r300: remove simple duplicate ARL instructions
authorPavel Ondračka <pavel.ondracka@gmail.com>
Wed, 26 Apr 2023 11:38:41 +0000 (13:38 +0200)
committerMarge Bot <emma+marge@anholt.net>
Sat, 29 Apr 2023 18:10:11 +0000 (18:10 +0000)
commit775e42e6b841c76337af9977f55d0ec74df3283d
tree86462aa7c646c81998bbfa9015c99bae3aee1e72
parentc5b3d488f9bed0616f42193073fa0014cb68284d
r300: remove simple duplicate ARL instructions

Removes duplicate ARL reads from the same source when the original ADDR
register is still live. This is the remaining low-hanging fruit from #7723
Should account for most of the potential improvements and is also
trivial as no source or destination rewrite is needed.

RV530:
total instructions in shared programs: 132447 -> 131488 (-0.72%)
instructions in affected programs: 33396 -> 32437 (-2.87%)
helped: 331
HURT: 0
total temps in shared programs: 17035 -> 17015 (-0.12%)
temps in affected programs: 361 -> 341 (-5.54%)
helped: 30
HURT: 10

RV370:
total instructions in shared programs: 83555 -> 82659 (-1.07%)
instructions in affected programs: 28310 -> 27414 (-3.16%)
helped: 312
HURT: 0
total temps in shared programs: 12418 -> 12426 (0.06%)
temps in affected programs: 302 -> 310 (2.65%)
helped: 21
HURT: 29

Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Reviewed-by: Filip Gawin <filip@gawin.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22752>
src/gallium/drivers/r300/compiler/radeon_optimize.c