agx: stop lowering in opt loop
silly total instructions in shared programs: 2278756 -> 2278751 (<.01%) instructions in affected programs: 587 -> 582 (-0.85%) helped: 2 HURT: 0 total bytes in shared programs: 15008934 -> 15008916 (<.01%) bytes in affected programs: 3794 -> 3776 (-0.47%) helped: 2 HURT: 0 total halfregs in shared programs: 519245 -> 519253 (<.01%) halfregs in affected programs: 63 -> 71 (12.70%) helped: 0 HURT: 1 Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
This commit is contained in:

committed by
Marge Bot

parent
9dfb072ae3
commit
08fc7a4082
@@ -2366,12 +2366,8 @@ agx_optimize_loop_nir(nir_shader *nir)
|
||||
do {
|
||||
progress = false;
|
||||
|
||||
NIR_PASS(progress, nir, nir_lower_var_copies);
|
||||
NIR_PASS(progress, nir, nir_lower_vars_to_ssa);
|
||||
|
||||
NIR_PASS(progress, nir, nir_copy_prop);
|
||||
NIR_PASS(progress, nir, nir_opt_remove_phis);
|
||||
NIR_PASS(progress, nir, nir_lower_phis_to_scalar, true);
|
||||
NIR_PASS(progress, nir, nir_opt_dce);
|
||||
NIR_PASS(progress, nir, nir_opt_dead_cf);
|
||||
NIR_PASS(progress, nir, nir_opt_cse);
|
||||
@@ -2379,9 +2375,7 @@ agx_optimize_loop_nir(nir_shader *nir)
|
||||
NIR_PASS(progress, nir, nir_opt_phi_precision);
|
||||
NIR_PASS(progress, nir, nir_opt_algebraic);
|
||||
NIR_PASS(progress, nir, nir_opt_constant_folding);
|
||||
|
||||
NIR_PASS(progress, nir, nir_opt_undef);
|
||||
|
||||
NIR_PASS(progress, nir, nir_opt_shrink_vectors);
|
||||
NIR_PASS(progress, nir, nir_opt_loop_unroll);
|
||||
} while (progress);
|
||||
@@ -2999,6 +2993,7 @@ agx_preprocess_nir(nir_shader *nir, const nir_shader *libagx,
|
||||
nir_metadata_block_index | nir_metadata_dominance, NULL);
|
||||
NIR_PASS_V(nir, nir_lower_frag_coord_to_pixel_coord);
|
||||
NIR_PASS_V(nir, agx_nir_lower_subgroups);
|
||||
NIR_PASS_V(nir, nir_lower_phis_to_scalar, true);
|
||||
|
||||
/* After lowering, run through the standard suite of NIR optimizations. We
|
||||
* will run through the loop later, once we have the shader key, but if we
|
||||
@@ -3056,6 +3051,8 @@ agx_compile_shader_nir(nir_shader *nir, struct agx_shader_key *key,
|
||||
if (nir->info.stage == MESA_SHADER_FRAGMENT)
|
||||
NIR_PASS(needs_libagx, nir, agx_nir_lower_interpolation);
|
||||
|
||||
NIR_PASS_V(nir, nir_lower_vars_to_ssa);
|
||||
|
||||
if (needs_libagx) {
|
||||
link_libagx(nir, key->libagx);
|
||||
|
||||
|
Reference in New Issue
Block a user