aco: remove SMEM_instruction::prevent_overflow
authorRhys Perry <pendingchaos02@gmail.com>
Tue, 18 Apr 2023 13:50:18 +0000 (14:50 +0100)
committerMarge Bot <emma+marge@anholt.net>
Wed, 19 Apr 2023 19:29:48 +0000 (19:29 +0000)
commit1a6095b36e9a5959abfe751a86377ecff745453a
tree0ffa9c0b3b314e66f00c6994554a2da6f0126435
parent957009978ef6d7121fc0d710d03bc20097d4d46b
aco: remove SMEM_instruction::prevent_overflow

This doesn't seem useful anymore, and it seems we forgot to set it in a
few places.

This commit changes the behaviour of the optimizer so that
prevent_overflow is always true.

fossil-db (navi21):
Totals from 7421 (5.47% of 135636) affected shaders:
Instrs: 5402823 -> 5440126 (+0.69%); split: -0.00%, +0.69%
CodeSize: 28731300 -> 28974152 (+0.85%); split: -0.00%, +0.85%
VGPRs: 317528 -> 317552 (+0.01%)
SpillSGPRs: 419 -> 415 (-0.95%)
Latency: 40712478 -> 40783115 (+0.17%); split: -0.01%, +0.19%
InvThroughput: 7612708 -> 7616751 (+0.05%); split: -0.00%, +0.06%
VClause: 123824 -> 123848 (+0.02%); split: -0.09%, +0.11%
SClause: 161915 -> 172741 (+6.69%); split: -0.03%, +6.71%
Copies: 393015 -> 394429 (+0.36%); split: -0.20%, +0.56%
PreSGPRs: 288658 -> 289603 (+0.33%); split: -0.04%, +0.36%

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8864
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22553>
src/amd/compiler/aco_instruction_selection.cpp
src/amd/compiler/aco_ir.h
src/amd/compiler/aco_opt_value_numbering.cpp
src/amd/compiler/aco_optimizer.cpp