mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 03:50:13 +01:00
pan/midgard: Add mir_exit_block helper
The exit block is gauranteed to be empty, signaling the end of the program. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
parent
aeeeef1242
commit
07c960cac0
1 changed files with 13 additions and 0 deletions
|
|
@ -377,6 +377,19 @@ mir_get_block(compiler_context *ctx, int idx)
|
|||
return (struct midgard_block *) lst;
|
||||
}
|
||||
|
||||
static inline midgard_block *
|
||||
mir_exit_block(struct compiler_context *ctx)
|
||||
{
|
||||
midgard_block *last = list_last_entry(&ctx->blocks,
|
||||
struct midgard_block, link);
|
||||
|
||||
/* The last block must be empty (the exit block) */
|
||||
assert(list_empty(&last->instructions));
|
||||
assert(last->nr_successors == 0);
|
||||
|
||||
return last;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
mir_is_alu_bundle(midgard_bundle *bundle)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue