mirror of https://gitlab.freedesktop.org/mesa/mesa
radv: move nir_opt_dead_cf() before nir_opt_loop()
This can avoid unnecessary CF transformations. Totals from 557 (0.70% of 79395) affected shaders: (GFX11) MaxWaves: 12020 -> 12028 (+0.07%) Instrs: 4237096 -> 4234110 (-0.07%); split: -0.08%, +0.01% CodeSize: 21731952 -> 21719556 (-0.06%); split: -0.06%, +0.00% VGPRs: 40492 -> 40480 (-0.03%) SpillSGPRs: 467 -> 416 (-10.92%) Latency: 25704891 -> 25684156 (-0.08%); split: -0.10%, +0.02% InvThroughput: 5545224 -> 5542998 (-0.04%); split: -0.06%, +0.02% VClause: 107850 -> 107838 (-0.01%); split: -0.02%, +0.01% SClause: 90450 -> 90440 (-0.01%); split: -0.05%, +0.04% Copies: 292714 -> 291354 (-0.46%); split: -0.50%, +0.03% Branches: 133630 -> 133617 (-0.01%); split: -0.01%, +0.00% PreSGPRs: 42299 -> 42104 (-0.46%); split: -0.48%, +0.02% PreVGPRs: 36396 -> 36393 (-0.01%); split: -0.02%, +0.01% VALU: 2321811 -> 2321192 (-0.03%); split: -0.03%, +0.01% SALU: 505001 -> 503289 (-0.34%); split: -0.35%, +0.01% SMEM: 132622 -> 132640 (+0.01%) Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28150>
This commit is contained in:
parent
4453971fbb
commit
ce51e48cb6
|
@ -147,6 +147,7 @@ radv_optimize_nir(struct nir_shader *shader, bool optimize_conservatively)
|
|||
NIR_LOOP_PASS(progress, skip, shader, nir_copy_prop);
|
||||
NIR_LOOP_PASS(progress, skip, shader, nir_opt_remove_phis);
|
||||
NIR_LOOP_PASS(progress, skip, shader, nir_opt_dce);
|
||||
NIR_LOOP_PASS(progress, skip, shader, nir_opt_dead_cf);
|
||||
bool opt_loop_progress = false;
|
||||
NIR_LOOP_PASS_NOT_IDEMPOTENT(opt_loop_progress, skip, shader, nir_opt_loop);
|
||||
if (opt_loop_progress) {
|
||||
|
@ -156,7 +157,6 @@ radv_optimize_nir(struct nir_shader *shader, bool optimize_conservatively)
|
|||
NIR_LOOP_PASS(progress, skip, shader, nir_opt_dce);
|
||||
}
|
||||
NIR_LOOP_PASS_NOT_IDEMPOTENT(progress, skip, shader, nir_opt_if, nir_opt_if_optimize_phi_true_false);
|
||||
NIR_LOOP_PASS(progress, skip, shader, nir_opt_dead_cf);
|
||||
NIR_LOOP_PASS(progress, skip, shader, nir_opt_cse);
|
||||
NIR_LOOP_PASS(progress, skip, shader, nir_opt_peephole_select, 8, true, true);
|
||||
NIR_LOOP_PASS(progress, skip, shader, nir_opt_constant_folding);
|
||||
|
|
Loading…
Reference in New Issue