aco: copy-propagate p_create_vector copies of vectors
authorRhys Perry <pendingchaos02@gmail.com>
Tue, 21 Apr 2020 16:37:44 +0000 (17:37 +0100)
committerMarge Bot <eric+marge@anholt.net>
Thu, 23 Apr 2020 12:39:33 +0000 (12:39 +0000)
commit2dc550202e82c5da198ad0a416a5d24dd89addd8
tree6bf04083a1436cb5b8876ea9192e798ef18ae390
parente4383b5c7f24a20ba16b0bb4f74fe5cecf406ddf
aco: copy-propagate p_create_vector copies of vectors

Instead of copying the operands of the other p_create_vector and labelling
the definition with label_vec, copy the operands and label it with
label_temp so that it can be copy-propagated.

This was found while removing a redundant copy in load_input_from_temps()
which removed duplicate p_create_vector instructions.

shader-db (Navi):
Totals from 139 (0.11% of 127638) affected shaders:
VGPRs: 8472 -> 7948 (-6.19%)
CodeSize: 514592 -> 512368 (-0.43%)
MaxWaves: 1089 -> 1195 (+9.73%)
Instrs: 100214 -> 99658 (-0.55%)
Cycles: 400856 -> 398632 (-0.55%)
VMEM: 15545 -> 15338 (-1.33%)
Copies: 5140 -> 4584 (-10.82%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4667>
src/amd/compiler/aco_optimizer.cpp