From 2075bff4e84437b42154febdd9525f6193ce528d Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 16 Jun 2022 12:14:20 -0400 Subject: [PATCH] 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 Part-of: --- 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 */