From 4a37fda8842fbf904d7cb8cd832bdeec370722c9 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 15 May 2026 15:43:34 -0700 Subject: [PATCH] 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 Part-of: --- src/compiler/nir/nir.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index fc773235968..344bc5f5dfd 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -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);