pan/midgard: Add mir_foreach_instr_in_block_rev
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 15 Aug 2019 16:51:13 +0000 (09:51 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 19 Aug 2019 15:32:17 +0000 (08:32 -0700)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/panfrost/midgard/compiler.h

index a78d933e9e43b8c56fe8bbd65715f88d7bc4cdb0..6f953d48cb80c1f44d9ac04c9ad3840cdc184b83 100644 (file)
@@ -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)