aco/ra: fix get_reg_for_operand() with no free registers
authorRhys Perry <pendingchaos02@gmail.com>
Fri, 23 Apr 2021 13:29:22 +0000 (14:29 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 17 May 2021 13:31:07 +0000 (13:31 +0000)
commitbc95d55e1f4ce54ff086352d5e52dc733d85118d
tree8553608398d9f97162ecd4f13406aa8273e8f705
parent4e459df0fcb42cfb7223e15ffd7e20bcc9b16e75
aco/ra: fix get_reg_for_operand() with no free registers

fossil-db (Sienna Cichlid):
Totals from 195 (0.13% of 149839) affected shaders:
CodeSize: 2352160 -> 2356720 (+0.19%); split: -0.00%, +0.20%
Instrs: 431976 -> 433124 (+0.27%); split: -0.00%, +0.27%
Latency: 10174434 -> 10174897 (+0.00%); split: -0.00%, +0.00%
InvThroughput: 4044388 -> 4044425 (+0.00%); split: -0.00%, +0.00%
Copies: 67634 -> 68762 (+1.67%); split: -0.00%, +1.67%

fossil-db (Polaris):
Totals from 186 (0.12% of 151365) affected shaders:
CodeSize: 2272356 -> 2276848 (+0.20%); split: -0.00%, +0.20%
Instrs: 432390 -> 433513 (+0.26%); split: -0.00%, +0.26%
Latency: 13153394 -> 13160194 (+0.05%); split: -0.00%, +0.05%
InvThroughput: 10889509 -> 10889967 (+0.00%); split: -0.00%, +0.00%
SClause: 12745 -> 12747 (+0.02%)
Copies: 74832 -> 75945 (+1.49%); split: -0.01%, +1.50%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10459>
src/amd/compiler/aco_register_allocation.cpp
src/amd/compiler/tests/test_regalloc.cpp