aco: Use more optimal sequence at the beginning of merged shaders.
authorTimur Kristóf <timur.kristof@gmail.com>
Fri, 13 Mar 2020 11:39:23 +0000 (12:39 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 30 Mar 2020 13:09:08 +0000 (13:09 +0000)
commite7d733fdab58b7fd08aa79ef7713e7be847377f4
tree3a331acf97702241adcb262726caeef2086b7dd8
parent17c779ab9e2bb9329f07299e327ac2c1c81f3cb3
aco: Use more optimal sequence at the beginning of merged shaders.

It can be further optimized in the future, but
the new sequence already has a few advantages:

* Uses fewer instructions
* Uses even fewer instructions in wave32 mode
* Doesn't use the VALU at all

Totals from affected shaders (GFX10):
VGPRS: 43504 -> 43496 (-0.02 %)
Code Size: 2436000 -> 2423688 (-0.51 %) bytes
Max Waves: 8704 -> 8705 (0.01 %)

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4165>
src/amd/compiler/aco_instruction_selection.cpp