aco: Reassign dead definitions of p_split_vector to associated register
authorDaniel Schürmann <daniel@schuermann.dev>
Wed, 2 Nov 2022 12:35:57 +0000 (13:35 +0100)
committerTimur Kristóf <timur.kristof@gmail.com>
Sun, 1 Jan 2023 14:04:07 +0000 (15:04 +0100)
commit83b31b11a595739e80f98be66d8b290af7670766
tree505cb01292451bff1209149c1c2fcd1e287f55a5
parent75b10277228b228a72b6fea5bea538e98180eabd
aco: Reassign dead definitions of p_split_vector to associated register

Any unused split_vector definition can always use the same register
as the operand. This avoids creating unnecessary copies.

Fossil DB stats on Rembrandt (RDNA2):
Totals from 3904 (2.89% of 134906) affected shaders:
CodeSize: 18326692 -> 18271688 (-0.30%)
Instrs: 3386632 -> 3372888 (-0.41%)
Latency: 42337481 -> 42330085 (-0.02%); split: -0.02%, +0.00%
InvThroughput: 6566731 -> 6566424 (-0.00%); split: -0.01%, +0.00%
Copies: 224301 -> 210559 (-6.13%)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16161>
src/amd/compiler/aco_optimizer_postRA.cpp