aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRhys Perry <[email protected]>2019-11-22 13:47:08 +0000
committerMarge Bot <[email protected]>2020-01-14 12:56:28 +0000
commitf4c2c90e1a227cb1a7a3d2f414f0bcc82b0cfa12 (patch)
tree322807e82bb7a401ad5cd4f0327b93bf82d17715
parent7da07ca3e43b92852715ab1c9b3848cb49bac567 (diff)
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 <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2883>
-rw-r--r--src/amd/compiler/aco_optimizer.cpp2
1 files changed, 0 insertions, 2 deletions
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<Instruction>& 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 */
}
}