From: Rhys Perry Date: Fri, 22 Nov 2019 13:47:08 +0000 (+0000) Subject: aco: allow applying two sgprs to an instruction X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f4c2c90e1a227cb1a7a3d2f414f0bcc82b0cfa12;p=mesa.git aco: allow applying two sgprs to an instruction We could create VALU instructions which read two sgprs, but only if isel created an instruction which already read one of them. This change is in a separate patch from the apply_sgprs() rewrite so that it can be tested if the rewrite affected anything. pipeline-db (Navi): Totals from affected shaders: SGPRS: 216 -> 216 (0.00 %) VGPRS: 64 -> 64 (0.00 %) Spilled SGPRs: 0 -> 0 (0.00 %) Spilled VGPRs: 0 -> 0 (0.00 %) Code Size: 1756 -> 1708 (-2.73 %) bytes Max Waves: 120 -> 120 (0.00 %) Instructions: 312 -> 300 (-3.85 %) pipeline-db (Vega): Totals from affected shaders: SGPRS: 216 -> 216 (0.00 %) VGPRS: 64 -> 64 (0.00 %) Spilled SGPRs: 0 -> 0 (0.00 %) Spilled VGPRs: 0 -> 0 (0.00 %) Code Size: 1784 -> 1736 (-2.69 %) bytes Max Waves: 120 -> 120 (0.00 %) Instructions: 319 -> 307 (-3.76 %) Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp index 8406a9168e0..70b8f24ea1a 100644 --- a/src/amd/compiler/aco_optimizer.cpp +++ b/src/amd/compiler/aco_optimizer.cpp @@ -1963,8 +1963,6 @@ void apply_sgprs(opt_ctx &ctx, aco_ptr& instr) sgpr_ids[num_sgprs++] = sgpr.id(); ctx.uses[sgpr_info_id]--; ctx.uses[sgpr.id()]++; - - break; /* for testing purposes, only apply 1 new sgpr */ } }