pan/bi: Inline node_to_index
authorAlyssa Rosenzweig <alyssa@collabora.com>
Mon, 25 Jul 2022 20:03:08 +0000 (16:03 -0400)
committerMarge Bot <emma+marge@anholt.net>
Fri, 2 Sep 2022 16:03:24 +0000 (16:03 +0000)
One user, now trivial.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17794>

src/panfrost/bifrost/bi_ra.c
src/panfrost/bifrost/compiler.h

index 27aa456..7fd9a9e 100644 (file)
@@ -1137,7 +1137,7 @@ bi_register_allocate(bi_context *ctx)
                                 spill_count = ALIGN_POT(spill_count, 16);
 
                         spill_count += bi_spill_register(ctx,
-                                        bi_node_to_index(spill_node, bi_max_temp(ctx)),
+                                        bi_get_index(spill_node, false, 0),
                                         spill_count);
 
                         /* In case the spill affected an instruction with tied
index eb4c06b..fc2bbc6 100644 (file)
@@ -948,15 +948,6 @@ bi_dest_index(nir_dest *dst)
         return bi_get_index(dst->ssa.index, false, 0);
 }
 
-static inline bi_index
-bi_node_to_index(unsigned node, unsigned node_count)
-{
-        assert(node < node_count);
-        assert(node_count < ~0u);
-
-        return bi_get_index(node, false, 0);
-}
-
 /* Iterators for Bifrost IR */
 
 #define bi_foreach_block(ctx, v) \