aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd/compiler
diff options
context:
space:
mode:
authorRhys Perry <[email protected]>2019-11-22 13:47:54 +0000
committerMarge Bot <[email protected]>2020-01-14 12:56:28 +0000
commit9c2d37308fdd50586e746235b8c6a8e08cf6ffa3 (patch)
treeed694481d2c9139740ff0bbd96c18030607671ae /src/amd/compiler
parentf4c2c90e1a227cb1a7a3d2f414f0bcc82b0cfa12 (diff)
aco: allow an extra SGPR with multiple uses to be applied to VOP3
This is in a separate patch from the apply_sgprs() rewrite so that the rewrite can be more easily tested. pipeline-db (Navi): Totals from affected shaders: SGPRS: 3056 -> 3056 (0.00 %) VGPRS: 1632 -> 1632 (0.00 %) Spilled SGPRs: 0 -> 0 (0.00 %) Spilled VGPRs: 0 -> 0 (0.00 %) Code Size: 156468 -> 156304 (-0.10 %) bytes Max Waves: 288 -> 288 (0.00 %) Instructions: 29510 -> 29469 (-0.14 %) pipeline-db (Vega): Totals from affected shaders: SGPRS: 2984 -> 2984 (0.00 %) VGPRS: 1616 -> 1616 (0.00 %) Spilled SGPRs: 0 -> 0 (0.00 %) Spilled VGPRs: 0 -> 0 (0.00 %) Code Size: 156132 -> 155968 (-0.11 %) bytes Max Waves: 289 -> 289 (0.00 %) Instructions: 29426 -> 29385 (-0.14 %) 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>
Diffstat (limited to 'src/amd/compiler')
-rw-r--r--src/amd/compiler/aco_optimizer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp
index 70b8f24ea1a..88075fabfb2 100644
--- a/src/amd/compiler/aco_optimizer.cpp
+++ b/src/amd/compiler/aco_optimizer.cpp
@@ -1937,7 +1937,7 @@ void apply_sgprs(opt_ctx &ctx, aco_ptr<Instruction>& instr)
/* Applying two sgprs require making it VOP3, so don't do it unless it's
* definitively beneficial.
* TODO: this is too conservative because later the use count could be reduced to 1 */
- if (num_sgprs && ctx.uses[sgpr_info_id] > 1)
+ if (num_sgprs && ctx.uses[sgpr_info_id] > 1 && !instr->isVOP3())
break;
Temp sgpr = ctx.info[sgpr_info_id].temp;