Mesa (main): pan/bi: Cull DTSEL_IMM dests in post-RA DCE
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Feb 22 17:10:15 UTC 2022
Module: Mesa
Branch: main
Commit: 87d46f40c87c6c612d61646382c74ccf533c5e09
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=87d46f40c87c6c612d61646382c74ccf533c5e09
Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date: Thu Dec 23 13:12:19 2021 -0500
pan/bi: Cull DTSEL_IMM dests in post-RA DCE
They are useless (given the semantics of DTSEL_IMM) and complicate
scoreboarding. Just remove them in the pass that removes all the other silly
register destinations.
Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14298>
---
src/panfrost/bifrost/bi_opt_dce.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/panfrost/bifrost/bi_opt_dce.c b/src/panfrost/bifrost/bi_opt_dce.c
index 141591dc532..d1d35920961 100644
--- a/src/panfrost/bifrost/bi_opt_dce.c
+++ b/src/panfrost/bifrost/bi_opt_dce.c
@@ -160,6 +160,9 @@ bi_opt_dce_post_ra(bi_context *ctx)
uint64_t live = block->reg_live_out;
bi_foreach_instr_in_block_rev(block, ins) {
+ if (ins->op == BI_OPCODE_DTSEL_IMM)
+ ins->dest[0] = bi_null();
+
bi_foreach_dest(ins, d) {
if (ins->dest[d].type != BI_INDEX_REGISTER)
continue;
More information about the mesa-commit
mailing list