From: Alyssa Rosenzweig Date: Thu, 28 May 2020 17:49:41 +0000 (-0400) Subject: pan/bi: Add bi_foreach_clause_in_block_from{_rev} helpers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=64c49ab1fc48e9a82c06f1e9fc92c3cf093ef3ce;p=mesa.git pan/bi: Add bi_foreach_clause_in_block_from{_rev} helpers Signed-off-by: Alyssa Rosenzweig Part-of: --- 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)