From: Alyssa Rosenzweig Date: Thu, 15 Aug 2019 16:51:13 +0000 (-0700) Subject: pan/midgard: Add mir_foreach_instr_in_block_rev X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=84580c6dbc31a65fe9170e1db3dcecd9bac63ba0;p=mesa.git pan/midgard: Add mir_foreach_instr_in_block_rev Signed-off-by: Alyssa Rosenzweig --- diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h index a78d933e9e4..6f953d48cb8 100644 --- a/src/panfrost/midgard/compiler.h +++ b/src/panfrost/midgard/compiler.h @@ -336,6 +336,8 @@ mir_next_op(struct midgard_instruction *ins) #define mir_foreach_instr_in_block(block, v) \ list_for_each_entry(struct midgard_instruction, v, &block->instructions, link) +#define mir_foreach_instr_in_block_rev(block, v) \ + list_for_each_entry_rev(struct midgard_instruction, v, &block->instructions, link) #define mir_foreach_instr_in_block_safe(block, v) \ list_for_each_entry_safe(struct midgard_instruction, v, &block->instructions, link)