radeonsi: use nir_opt_sink

TOTALS FROM AFFECTED SHADERS (29673/58359) - ACO
  Spilled SGPRs: 860 -> 446 (-48.14 %)
  Code Size: 41681748 -> 41337964 (-0.82 %) bytes
  Max Waves: 465904 -> 466036 (0.03 %)

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32782>
This commit is contained in:
Marek Olšák 2024-12-30 04:07:35 -05:00 committed by Marge Bot
parent 7fbca998b1
commit f114a18501

View file

@ -2671,6 +2671,10 @@ static struct nir_shader *si_get_nir_shader(struct si_shader *shader, struct si_
if (late_opts)
si_nir_late_opts(nir);
NIR_PASS(progress, nir, nir_opt_sink,
nir_move_const_undef | nir_move_copies | nir_move_alu | nir_move_comparisons |
nir_move_load_ubo | nir_move_load_ssbo);
/* aco only accept scalar const, must be done after si_nir_late_opts()
* which may generate vec const.
*/