pan/bi: Add dead code elimination pass
Now that we have liveness analysis, we can cleanup the IR considerably.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4150>
diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h
index cc00c7f..57ffdf2 100644
--- a/src/panfrost/bifrost/compiler.h
+++ b/src/panfrost/bifrost/compiler.h
@@ -378,7 +378,7 @@
/* Keep me synced please so we can check src & BIR_SPECIAL */
#define BIR_SPECIAL ((BIR_INDEX_REGISTER | BIR_INDEX_UNIFORM) | \
- (BIR_INDEX_CONSTANT | BIR_INDEX_ZERO)
+ (BIR_INDEX_CONSTANT | BIR_INDEX_ZERO))
static inline unsigned
bi_max_temp(bi_context *ctx)
@@ -501,6 +501,7 @@
/* BIR passes */
+bool bi_opt_dead_code_eliminate(bi_context *ctx, bi_block *block);
void bi_schedule(bi_context *ctx);
/* Liveness */