pan/bi: Add bi_foreach_clause_in_block_from{_rev} helpers
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 28 May 2020 17:49:41 +0000 (13:49 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 29 May 2020 20:34:55 +0000 (20:34 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5260>

src/panfrost/bifrost/compiler.h

index a283f3fed60a55962b15e720f6be7de58955778e..bfa8ab81fe0592951a73542cf839b7d3be21ef7c 100644 (file)
@@ -520,6 +520,12 @@ bi_make_temp_reg(bi_context *ctx)
 #define bi_foreach_clause_in_block(block, v) \
         list_for_each_entry(bi_clause, v, &(block)->clauses, link)
 
+#define bi_foreach_clause_in_block_from(block, v, from) \
+        list_for_each_entry_from(bi_clause, v, from, &(block)->clauses, link)
+
+#define bi_foreach_clause_in_block_from_rev(block, v, from) \
+        list_for_each_entry_from_rev(bi_clause, v, from, &(block)->clauses, link)
+
 #define bi_foreach_instr_global(ctx, v) \
         bi_foreach_block(ctx, v_block) \
                 bi_foreach_instr_in_block((bi_block *) v_block, v)