From e1b280a85f16ddb757d928cead60ed0735fdfbab Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Sat, 7 Sep 2024 15:08:01 +0200 Subject: [PATCH] aco: use ac_nir_opt_shared_append Foz-DB Navi21: Totals from 46 (0.06% of 79395) affected shaders: Instrs: 85383 -> 84759 (-0.73%) CodeSize: 449840 -> 447064 (-0.62%) Latency: 570585 -> 566983 (-0.63%); split: -0.63%, +0.00% InvThroughput: 133619 -> 132777 (-0.63%) VClause: 1769 -> 1771 (+0.11%) SClause: 2524 -> 2525 (+0.04%) Copies: 6347 -> 6139 (-3.28%) Branches: 4246 -> 4170 (-1.79%) PreSGPRs: 2109 -> 2091 (-0.85%) VALU: 50968 -> 50758 (-0.41%) SALU: 14473 -> 14129 (-2.38%) Reviewed-by: Rhys Perry Part-of: --- src/amd/compiler/aco_instruction_selection_setup.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/amd/compiler/aco_instruction_selection_setup.cpp b/src/amd/compiler/aco_instruction_selection_setup.cpp index 45d5c8f85d4..7f865437794 100644 --- a/src/amd/compiler/aco_instruction_selection_setup.cpp +++ b/src/amd/compiler/aco_instruction_selection_setup.cpp @@ -281,6 +281,8 @@ init_context(isel_context* ctx, nir_shader* shader) ctx->ub_config.max_workgroup_size[1] = 2048; ctx->ub_config.max_workgroup_size[2] = 2048; + ac_nir_opt_shared_append(shader); + nir_divergence_analysis(shader); if (nir_opt_uniform_atomics(shader, false) && nir_lower_int64(shader)) nir_divergence_analysis(shader);