Mesa (main): pan/bi: Mark bi_postra_liveness_ins as MUST_CHECK
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 21 22:41:34 UTC 2022
Module: Mesa
Branch: main
Commit: 2075bff4e84437b42154febdd9525f6193ce528d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2075bff4e84437b42154febdd9525f6193ce528d
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Thu Jun 16 12:14:20 2022 -0400
pan/bi: Mark bi_postra_liveness_ins as MUST_CHECK
Post-RA liveness relies on the caller updating the live variable with the
results of bi_postra_liveness_ins. It is not automatic, as with regular
liveness. This means ignoring the result of bi_postra_liveness_ins is surely an
error. Mark it as MUST_CHECK to catch that error at compile time.
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17091>
---
src/panfrost/bifrost/bi_opt_dce.c | 2 +-
src/panfrost/bifrost/compiler.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/panfrost/bifrost/bi_opt_dce.c b/src/panfrost/bifrost/bi_opt_dce.c
index 9b3595265e1..24c43cae4b6 100644
--- a/src/panfrost/bifrost/bi_opt_dce.c
+++ b/src/panfrost/bifrost/bi_opt_dce.c
@@ -77,7 +77,7 @@ bi_opt_dead_code_eliminate(bi_context *ctx)
/* Post-RA liveness-based dead code analysis to clean up results of bundling */
-uint64_t
+uint64_t MUST_CHECK
bi_postra_liveness_ins(uint64_t live, bi_instr *ins)
{
bi_foreach_dest(ins, d) {
diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h
index 902239236fc..010b0a4c6e5 100644
--- a/src/panfrost/bifrost/compiler.h
+++ b/src/panfrost/bifrost/compiler.h
@@ -1133,7 +1133,7 @@ void bi_compute_liveness(bi_context *ctx);
void bi_liveness_ins_update(uint8_t *live, bi_instr *ins, unsigned max);
void bi_postra_liveness(bi_context *ctx);
-uint64_t bi_postra_liveness_ins(uint64_t live, bi_instr *ins);
+uint64_t MUST_CHECK bi_postra_liveness_ins(uint64_t live, bi_instr *ins);
/* Layout */
More information about the mesa-commit
mailing list