From a42731536d59ec2c028138d303d15c18158e85c9 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 28 May 2020 15:01:38 -0400 Subject: [PATCH] pan/bi: Add bi_foreach_block_from_rev helper Needed for next commit. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/compiler.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index 92dfb963ed7..95c35609e5e 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -498,6 +498,9 @@ bi_make_temp_reg(bi_context *ctx) #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) -- 2.30.2