From: Rhys Perry Date: Tue, 15 Oct 2019 16:01:24 +0000 (+0100) Subject: aco: keep can_reorder/barrier when combining addition into SMEM X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c96289a70ef1239a31f2b6e845fa58710ce14faf;p=mesa.git 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 Reviewed-by: Daniel Schürmann --- 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& 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(instr.get()); }