aco: consider how definitions fixed to operands can change register demand
authorRhys Perry <pendingchaos02@gmail.com>
Wed, 12 Apr 2023 15:00:10 +0000 (16:00 +0100)
committerMarge Bot <emma+marge@anholt.net>
Wed, 24 May 2023 18:58:15 +0000 (18:58 +0000)
commitfab911858c8575c50e90389f21ed5c92f846bda4
tree6fcd87023e48b684d5f49a56ce8145a35e347cf8
parent446d0dd658599cbe20481383a18f903b1706d5e1
aco: consider how definitions fixed to operands can change register demand

Usually the register demand before an instruction would be considered part
of the previous instruction, since it's not greater than the register
demand for that previous instruction. Except, it can be greater in the
case of an definition fixed to a non-killed operand: the RA needs to
reserve space between the two instructions for the definition (containing
a copy of the operand).

fossil-db (navi21):
Totals from 5 (0.00% of 135636) affected shaders:
PreVGPRs: 35 -> 40 (+14.29%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8807
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22446>
src/amd/compiler/aco_live_var_analysis.cpp