pan/bi: Add bi_foreach_block_from_rev helper
Needed for next commit.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5260>
diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h
index 92dfb96..95c3560 100644
--- a/src/panfrost/bifrost/compiler.h
+++ b/src/panfrost/bifrost/compiler.h
@@ -498,6 +498,9 @@
#define bi_foreach_block_from(ctx, from, v) \
list_for_each_entry_from(pan_block, v, from, &ctx->blocks, link)
+#define bi_foreach_block_from_rev(ctx, from, v) \
+ list_for_each_entry_from_rev(pan_block, v, from, &ctx->blocks, link)
+
#define bi_foreach_instr_in_block(block, v) \
list_for_each_entry(bi_instruction, v, &(block)->base.instructions, link)