From 64c49ab1fc48e9a82c06f1e9fc92c3cf093ef3ce Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 28 May 2020 13:49:41 -0400 Subject: [PATCH] pan/bi: Add bi_foreach_clause_in_block_from{_rev} helpers Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/compiler.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index a283f3fed60..bfa8ab81fe0 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -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) -- 2.30.2