Module: Mesa Branch: master Commit: dbce99a809dfd9f050ba28b8341562e418675695 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=dbce99a809dfd9f050ba28b8341562e418675695
Author: Boris Brezillon <[email protected]> Date: Mon Jan 25 12:02:21 2021 +0100 pan/bi: Add an is_terminal_block() helper Needed to decide what to do with JUMPs/BRANCHes to such blocks. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8848> --- src/panfrost/bifrost/compiler.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index 33dac9ce761..8b21728e31e 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -746,6 +746,15 @@ bool bi_can_insert_tuple(bi_clause *clause, bool constant); unsigned bi_clause_quadwords(bi_clause *clause); signed bi_block_offset(bi_context *ctx, bi_clause *start, bi_block *target); +static inline bool +bi_is_terminal_block(bi_context *ctx, bi_block *block) +{ + + return block->base.successors[0] == NULL && + block->base.successors[1] == NULL && + list_is_empty(&block->clauses); +} + /* Code emit */ void bi_pack(bi_context *ctx, struct util_dynarray *emission); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
