pan/mdg: Enable nir_opt_{move, sink}
I felt bad about the last patch regressing Midgard perf, so here's some moar Midgard perf for you ^^ total instructions in shared programs: 97089 -> 97036 (-0.05%) instructions in affected programs: 5230 -> 5177 (-1.01%) helped: 53 HURT: 31 helped stats (abs) min: 1 max: 17 x̄: 4.40 x̃: 6 helped stats (rel) min: 0.61% max: 12.24% x̄: 7.74% x̃: 11.54% HURT stats (abs) min: 1 max: 8 x̄: 5.81 x̃: 8 HURT stats (rel) min: 1.08% max: 13.79% x̄: 9.69% x̃: 11.11% 95% mean confidence interval for instructions value: -1.89 0.63 95% mean confidence interval for instructions %-change: -3.41% 0.80% Inconclusive result (value mean confidence interval includes 0). total bundles in shared programs: 45612 -> 45507 (-0.23%) bundles in affected programs: 17331 -> 17226 (-0.61%) helped: 139 HURT: 166 helped stats (abs) min: 1 max: 21 x̄: 3.76 x̃: 2 helped stats (rel) min: 0.85% max: 18.37% x̄: 6.38% x̃: 4.55% HURT stats (abs) min: 1 max: 10 x̄: 2.51 x̃: 1 HURT stats (rel) min: 0.79% max: 31.25% x̄: 7.54% x̃: 4.55% 95% mean confidence interval for bundles value: -0.90 0.21 95% mean confidence interval for bundles %-change: 0.05% 2.34% Inconclusive result (value mean confidence interval includes 0). total quadwords in shared programs: 77275 -> 76952 (-0.42%) quadwords in affected programs: 32314 -> 31991 (-1.00%) helped: 142 HURT: 179 helped stats (abs) min: 1 max: 28 x̄: 4.38 x̃: 2 helped stats (rel) min: 0.34% max: 13.79% x̄: 4.29% x̃: 2.78% HURT stats (abs) min: 1 max: 6 x̄: 1.67 x̃: 2 HURT stats (rel) min: 0.44% max: 16.67% x̄: 2.93% x̃: 2.63% 95% mean confidence interval for quadwords value: -1.56 -0.45 95% mean confidence interval for quadwords %-change: -0.78% 0.25% Inconclusive result (%-change mean confidence interval includes 0). total registers in shared programs: 7081 -> 6771 (-4.38%) registers in affected programs: 2217 -> 1907 (-13.98%) helped: 193 HURT: 75 helped stats (abs) min: 1 max: 6 x̄: 2.04 x̃: 1 helped stats (rel) min: 6.25% max: 62.50% x̄: 24.32% x̃: 20.00% HURT stats (abs) min: 1 max: 3 x̄: 1.11 x̃: 1 HURT stats (rel) min: 7.14% max: 50.00% x̄: 17.17% x̃: 14.29% 95% mean confidence interval for registers value: -1.37 -0.94 95% mean confidence interval for registers %-change: -15.53% -9.89% Registers are helped. total threads in shared programs: 5036 -> 5152 (2.30%) threads in affected programs: 185 -> 301 (62.70%) helped: 93 HURT: 19 helped stats (abs) min: 1 max: 2 x̄: 1.49 x̃: 1 helped stats (rel) min: 100.00% max: 100.00% x̄: 100.00% x̃: 100.00% HURT stats (abs) min: 1 max: 2 x̄: 1.21 x̃: 1 HURT stats (rel) min: 50.00% max: 50.00% x̄: 50.00% x̃: 50.00% 95% mean confidence interval for threads value: 0.82 1.25 95% mean confidence interval for threads %-change: 63.96% 85.14% Threads are helped. total loops in shared programs: 19 -> 19 (0.00%) loops in affected programs: 0 -> 0 helped: 0 HURT: 0 total spills in shared programs: 2 -> 0 spills in affected programs: 2 -> 0 helped: 1 HURT: 0 total fills in shared programs: 15 -> 0 fills in affected programs: 15 -> 0 helped: 1 HURT: 0 Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10652>
This commit is contained in:
parent
ad6e53da5c
commit
ba39367b96
|
@ -418,6 +418,15 @@ optimise_nir(nir_shader *nir, unsigned quirks, bool is_blend)
|
|||
NIR_PASS(progress, nir, nir_copy_prop);
|
||||
NIR_PASS(progress, nir, nir_opt_dce);
|
||||
|
||||
/* Backend scheduler is purely local, so do some global optimizations
|
||||
* to reduce register pressure. */
|
||||
nir_move_options move_all =
|
||||
nir_move_const_undef | nir_move_load_ubo | nir_move_load_input |
|
||||
nir_move_comparisons | nir_move_copies | nir_move_load_ssbo;
|
||||
|
||||
NIR_PASS_V(nir, nir_opt_sink, move_all);
|
||||
NIR_PASS_V(nir, nir_opt_move, move_all);
|
||||
|
||||
/* Take us out of SSA */
|
||||
NIR_PASS(progress, nir, nir_lower_locals_to_regs);
|
||||
NIR_PASS(progress, nir, nir_convert_from_ssa, true);
|
||||
|
|
Loading…
Reference in New Issue