aco: limit VALUPartialForwardingHazard search
authorRhys Perry <pendingchaos02@gmail.com>
Thu, 26 Jan 2023 16:14:26 +0000 (16:14 +0000)
committerMarge Bot <emma+marge@anholt.net>
Wed, 1 Feb 2023 18:52:40 +0000 (18:52 +0000)
commitbfd4ac4581bae0d36b2c58524131f91c7c0d27ce
tree7133e17fe166b84c93dc3c17c21101c6ae19aff4
parent8092bc2158ebb8a5f85e0ec569387c5dcd0d1627
aco: limit VALUPartialForwardingHazard search

Complicated CFG and lots of SALU can cause this to take an extremely long
time to finish.

Fixes
dEQP-VK.graphicsfuzz.cov-value-tracking-selection-dag-negation-clamp-loop
and Monster Hunter Rise demo compile times.

fossil-db (gfx1100):
Totals from 57 (0.04% of 134574) affected shaders:
Instrs: 170919 -> 171165 (+0.14%)
CodeSize: 860144 -> 861128 (+0.11%)
Latency: 961466 -> 961505 (+0.00%)
InvThroughput: 127598 -> 127608 (+0.01%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8153
Fixes: 5806f0246fd ("aco/gfx11: workaround VALUPartialForwardingHazard")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20941>
src/amd/compiler/aco_insert_NOPs.cpp