radv: move nir_opt_copy_prop_vars out of optimization loop
The effect of this change alone is >4% faster compile times. Totals from 356 (0.45% of 79839) affected shaders: (Navi48) Instrs: 833062 -> 817649 (-1.85%); split: -1.97%, +0.12% CodeSize: 4387976 -> 4312616 (-1.72%); split: -1.93%, +0.22% SpillSGPRs: 430 -> 421 (-2.09%) LDS: 877568 -> 880640 (+0.35%) Latency: 8862905 -> 8861517 (-0.02%); split: -0.29%, +0.28% InvThroughput: 1470875 -> 1471874 (+0.07%); split: -0.22%, +0.28% VClause: 16744 -> 16452 (-1.74%); split: -1.82%, +0.07% SClause: 17583 -> 17058 (-2.99%); split: -3.04%, +0.06% Copies: 58959 -> 58701 (-0.44%); split: -0.57%, +0.14% Branches: 20355 -> 20276 (-0.39%); split: -0.58%, +0.20% PreSGPRs: 21477 -> 21280 (-0.92%); split: -0.93%, +0.01% PreVGPRs: 20596 -> 20627 (+0.15%); split: -0.27%, +0.42% VALU: 449148 -> 440751 (-1.87%); split: -1.92%, +0.05% SALU: 126577 -> 123978 (-2.05%); split: -2.15%, +0.09% VMEM: 33549 -> 33559 (+0.03%); split: -1.69%, +1.72% SMEM: 31280 -> 30543 (-2.36%); split: -2.36%, +0.00% VOPD: 254 -> 251 (-1.18%); split: +0.39%, -1.57% Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38367>
This commit is contained in:
committed by
Marge Bot
parent
7ff8cf3e7b
commit
36b0fdb7b7
@@ -172,7 +172,6 @@ radv_optimize_nir(struct nir_shader *shader, bool optimize_conservatively)
|
||||
|
||||
NIR_LOOP_PASS(progress, skip, shader, nir_split_array_vars, nir_var_function_temp);
|
||||
NIR_LOOP_PASS(progress, skip, shader, nir_shrink_vec_array_vars, nir_var_function_temp | nir_var_mem_shared);
|
||||
NIR_LOOP_PASS(progress, skip, shader, nir_opt_copy_prop_vars);
|
||||
|
||||
NIR_LOOP_PASS(_, skip, shader, nir_lower_phis_to_scalar, ac_nir_lower_phis_to_scalar_cb, NULL);
|
||||
NIR_LOOP_PASS(progress, skip, shader, nir_copy_prop);
|
||||
@@ -720,6 +719,7 @@ radv_shader_spirv_to_nir(struct radv_device *device, const struct radv_shader_st
|
||||
|
||||
radv_optimize_nir(nir, false);
|
||||
|
||||
NIR_PASS(_, nir, nir_opt_copy_prop_vars);
|
||||
NIR_PASS(_, nir, nir_opt_dead_write_vars);
|
||||
NIR_PASS(_, nir, nir_opt_memcpy);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user