Mesa (master): aco: keep can_reorder/barrier when combining addition into SMEM

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Oct 22 19:56:11 UTC 2019


Module: Mesa
Branch: master
Commit: c96289a70ef1239a31f2b6e845fa58710ce14faf
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c96289a70ef1239a31f2b6e845fa58710ce14faf

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Tue Oct 15 17:01:24 2019 +0100

aco: keep can_reorder/barrier when combining addition into SMEM

Affects 30 shaders in the pipeline-db (all youngblood).

Totals from affected shaders:
SGPRS: 2656 -> 2456 (-7.53 %)
VGPRS: 2260 -> 2260 (0.00 %)
Spilled SGPRs: 0 -> 0 (0.00 %)
Spilled VGPRs: 0 -> 0 (0.00 %)
Private memory VGPRs: 0 -> 0 (0.00 %)
Scratch size: 0 -> 0 (0.00 %) dwords per thread
Code Size: 240680 -> 240944 (0.11 %) bytes
LDS: 0 -> 0 (0.00 %) blocks
Max Waves: 90 -> 90 (0.00 %)

Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>

---

 src/amd/compiler/aco_optimizer.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp
index d9596ea8b59..9501073debb 100644
--- a/src/amd/compiler/aco_optimizer.cpp
+++ b/src/amd/compiler/aco_optimizer.cpp
@@ -703,6 +703,8 @@ void label_instruction(opt_ctx &ctx, aco_ptr<Instruction>& instr)
                new_instr->operands.back() = Operand(base);
                if (!smem->definitions.empty())
                   new_instr->definitions[0] = smem->definitions[0];
+               new_instr->can_reorder = smem->can_reorder;
+               new_instr->barrier = smem->barrier;
                instr.reset(new_instr);
                smem = static_cast<SMEM_instruction *>(instr.get());
             }




More information about the mesa-commit mailing list