nir: Remove nir_ssa_for_src
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Fri, 15 Sep 2023 15:11:04 +0000 (11:11 -0400)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Mon, 18 Sep 2023 14:25:17 +0000 (10:25 -0400)
It is now unused and has no real use cases now that nir_register is gone.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25247>

src/compiler/nir/nir_builder.c
src/compiler/nir/nir_builder.h

index b5350de..8a93394 100644 (file)
@@ -337,21 +337,7 @@ nir_vec_scalars(nir_builder *build, nir_scalar *comp, unsigned num_components)
 }
 
 /**
- * Turns a nir_src into a nir_def * so it can be passed to
- * nir_build_alu()-based builder calls.
- *
- * See nir_ssa_for_alu_src() for alu instructions.
- */
-nir_def *
-nir_ssa_for_src(nir_builder *build, nir_src src, ASSERTED int num_components)
-{
-   assert(src.ssa->num_components == num_components && "now required");
-   return src.ssa;
-}
-
-/**
- * Similar to nir_ssa_for_src(), but for alu srcs, respecting the
- * nir_alu_src's swizzle.
+ * Get nir_def for an alu src, respecting the nir_alu_src's swizzle.
  */
 nir_def *
 nir_ssa_for_alu_src(nir_builder *build, nir_alu_instr *instr, unsigned srcn)
index cc3be4c..c9f3465 100644 (file)
@@ -1349,9 +1349,6 @@ nir_resize_vector(nir_builder *b, nir_def *src, unsigned num_components)
 }
 
 nir_def *
-nir_ssa_for_src(nir_builder *build, nir_src src, int num_components);
-
-nir_def *
 nir_ssa_for_alu_src(nir_builder *build, nir_alu_instr *instr, unsigned srcn);
 
 static inline unsigned