mesa/src/amd
Timur Kristóf 75b1027722 aco: Try to reassign split vector registers post-RA.
Eliminate unnecessary copies when the operand registers of a
p_split_vector instruction are not clobbered between the p_split_vector
and the user of its definitions.

This happens when p_split_vector doesn't kill its operand and its
definitions have a shorter lifespan that the operand. It affects every
NGG culling shader among other things.

This optimization exists because it's too difficult to solve it
in RA, and should be removed after we solved this in RA.

v2 by Daniel Schürmann:
- Rearrange and simplify conditions for the new optimization
- Fix a few bugs

v3 by Daniel Schürmann:
- Check number of encoded ALU operands

Fossil DB stats on Rembrandt (RDNA2):
Totals from 64896 (48.10% of 134906) affected shaders:
CodeSize: 175693348 -> 175434944 (-0.15%)
Instrs: 33333912 -> 33269388 (-0.19%)
Latency: 183766084 -> 183763432 (-0.00%); split: -0.00%, +0.00%
InvThroughput: 28589651 -> 28589340 (-0.00%); split: -0.00%, +0.00%
Copies: 2806550 -> 2742038 (-2.30%)

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16161>
2023-01-01 15:04:07 +01:00
..
addrlib meson: Enable initialized-but-unused warning for MSVC 2022-11-17 21:20:38 +00:00
ci ci/amd: decrease number of stoney runners 2022-12-28 19:30:55 +01:00
common ac: Add has_taskmesh_indirect0_bug field to ac_gpu_info struct. 2022-12-21 17:40:28 +01:00
compiler aco: Try to reassign split vector registers post-RA. 2023-01-01 15:04:07 +01:00
drm-shim r300: use drm_shim_override 2022-11-16 14:37:47 +00:00
llvm ac/llvm: remove deref image/texture code 2022-12-19 09:22:45 +08:00
registers amd/registers: regenerate gfx11 headers from amd-staging-drm-next 2022-11-04 00:42:08 +00:00
vulkan radv: Add a driconf to advertise rt pipelines 2022-12-31 20:24:54 +00:00
.clang-format radv: Add nir_foreach_variable_with_modes to .clang-format 2022-12-09 07:07:10 +00:00
meson.build meson: build radeon drm-shim also for r300 and r600 2022-11-16 14:37:47 +00:00