nir: Use nir_instr_remove_v in nir_def_replace

The non _v version sets up and returns a nir_cursor that isn't
used. Skip that work by calling nir_instr_remove_v directly.

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41871>
This commit is contained in:
Ian Romanick 2026-05-15 15:43:34 -07:00 committed by Marge Bot
parent 56a8225742
commit 4a37fda884

View file

@ -4884,7 +4884,7 @@ static inline void
nir_def_replace(nir_def *def, nir_def *new_ssa)
{
nir_def_rewrite_uses(def, new_ssa);
nir_instr_remove(nir_def_instr(def));
nir_instr_remove_v(nir_def_instr(def));
}
nir_component_mask_t nir_src_components_read(const nir_src *src);