broadcom/compiler: sink uniform loads
authorIago Toral Quiroga <itoral@igalia.com>
Wed, 23 Feb 2022 08:58:33 +0000 (09:58 +0100)
committerMarge Bot <emma+marge@anholt.net>
Wed, 2 Mar 2022 08:09:11 +0000 (08:09 +0000)
total instructions in shared programs: 13014428 -> 13000420 (-0.11%)
instructions in affected programs: 743624 -> 729616 (-1.88%)
helped: 1392
HURT: 611

total threads in shared programs: 415858 -> 415874 (<.01%)
threads in affected programs: 16 -> 32 (100.00%)
helped: 8
HURT: 0

total uniforms in shared programs: 3720410 -> 3711652 (-0.24%)
uniforms in affected programs: 113442 -> 104684 (-7.72%)
helped: 635
HURT: 29

total max-temps in shared programs: 2154268 -> 2144876 (-0.44%)
max-temps in affected programs: 61279 -> 51887 (-15.33%)
helped: 1124
HURT: 187

total spills in shared programs: 4002 -> 3870 (-3.30%)
spills in affected programs: 265 -> 133 (-49.81%)
helped: 6
HURT: 0

total fills in shared programs: 5788 -> 5560 (-3.94%)
fills in affected programs: 603 -> 375 (-37.81%)
helped: 6
HURT: 0

Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15168>

src/broadcom/compiler/nir_to_vir.c

index 53d22f0..8dcad1a 100644 (file)
@@ -2158,7 +2158,7 @@ v3d_optimize_nir(struct v3d_compile *c, struct nir_shader *s)
 
         nir_move_options sink_opts =
                 nir_move_const_undef | nir_move_comparisons | nir_move_copies |
-                nir_move_load_ubo;
+                nir_move_load_ubo | nir_move_load_uniform;
         NIR_PASS(progress, s, nir_opt_sink, sink_opts);
 
         NIR_PASS(progress, s, nir_opt_move, nir_move_load_ubo);