From a372368e228ac587c5fad74d381dd16b072da245 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 16 Jul 2021 18:33:32 -0400 Subject: [PATCH] pan/bi: Copy back bi_foreach_successor Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/compiler.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index 2de1f69a02e..4bc29dcc96a 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -734,6 +734,14 @@ bi_node_to_index(unsigned node, unsigned node_count) v != NULL; \ v = (v == (tuple)->add) ? NULL : (tuple)->add) +#define bi_foreach_successor(blk, v) \ + bi_block *v; \ + bi_block **_v; \ + for (_v = &blk->successors[0], \ + v = *_v; \ + v != NULL && _v < &blk->successors[2]; \ + _v++, v = *_v) \ + /* Based on set_foreach, expanded with automatic type casts */ #define bi_foreach_predecessor(blk, v) \