nir/gcm: Consider dead code elimination done by GCM as progress

This will also fix NIR_DEBUG=extended_validation complaining about
invalid loop analysis.  GCM will invalidate loop analysis if progress
was made, and depending on the removed instruction it will affect the
instr_cost.

Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38932>
This commit is contained in:
Caio Oliveira 2025-12-12 15:29:35 -08:00 committed by Marge Bot
parent c7a345aea6
commit a4e84c9244

View file

@ -759,6 +759,7 @@ gcm_place_instr(nir_instr *instr, struct gcm_state *state)
if (instr->block == NULL) { if (instr->block == NULL) {
nir_foreach_def(instr, gcm_replace_def_with_undef, state); nir_foreach_def(instr, gcm_replace_def_with_undef, state);
nir_instr_remove(instr); nir_instr_remove(instr);
state->progress = true;
return; return;
} }