Module: Mesa Branch: main Commit: e3f14b9850e4452742aab7e08f725a4b8858904a URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e3f14b9850e4452742aab7e08f725a4b8858904a
Author: Alyssa Rosenzweig <[email protected]> Date: Tue Jul 27 18:29:58 2021 -0400 pan/bi: Add bi_entry_block helper Useful for checking invariants at the start of the program. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12130> --- src/panfrost/bifrost/compiler.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index 02df7f8ebae..b1d50cc7945 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -862,6 +862,12 @@ bi_next_block(bi_block *block) return list_first_entry(&(block->link), bi_block, link); } +static inline bi_block * +bi_entry_block(bi_context *ctx) +{ + return list_first_entry(&ctx->blocks, bi_block, link); +} + /* BIR manipulation */ bool bi_has_arg(const bi_instr *ins, bi_index arg); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
