aboutsummaryrefslogtreecommitdiffstats
path: root/src/panfrost/util/pan_ir.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/panfrost/util/pan_ir.h')
-rw-r--r--src/panfrost/util/pan_ir.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/panfrost/util/pan_ir.h b/src/panfrost/util/pan_ir.h
index c57a8e01c34..a45478ae6ec 100644
--- a/src/panfrost/util/pan_ir.h
+++ b/src/panfrost/util/pan_ir.h
@@ -160,6 +160,13 @@ struct pan_instruction {
_entry_##v = _mesa_set_next_entry(blk->predecessors, _entry_##v), \
v = (struct pan_block *) (_entry_##v ? _entry_##v->key : NULL))
+static inline pan_block *
+pan_exit_block(struct list_head *blocks)
+{
+ pan_block *last = list_last_entry(blocks, pan_block, link);
+ assert(!last->successors[0] && !last->successors[1]);
+ return last;
+}
typedef void (*pan_liveness_update)(uint16_t *, void *, unsigned max);