From a01680b9795c60b4ba33b85db1e9007f549b4960 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 20 Dec 2022 14:52:20 -0500 Subject: [PATCH] agx: Remove logical_end later So we can use after_block_logical in the wait insertion pass. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/compiler/agx_pack.c | 5 +++++ src/asahi/compiler/agx_register_allocate.c | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/asahi/compiler/agx_pack.c b/src/asahi/compiler/agx_pack.c index fb4fda2a116..2272ea40dc5 100644 --- a/src/asahi/compiler/agx_pack.c +++ b/src/asahi/compiler/agx_pack.c @@ -727,6 +727,11 @@ agx_pack_binary(agx_context *ctx, struct util_dynarray *emission) struct util_dynarray fixups; util_dynarray_init(&fixups, ctx); + agx_foreach_instr_global_safe(ctx, I) { + if (I->op == AGX_OPCODE_LOGICAL_END) + agx_remove_instruction(I); + } + agx_foreach_block(ctx, block) { /* Relative to the start of the binary, the block begins at the current * number of bytes emitted */ diff --git a/src/asahi/compiler/agx_register_allocate.c b/src/asahi/compiler/agx_register_allocate.c index 7d4efa403a8..b4cd2a1c6cc 100644 --- a/src/asahi/compiler/agx_register_allocate.c +++ b/src/asahi/compiler/agx_register_allocate.c @@ -596,7 +596,6 @@ agx_ra(agx_context *ctx) switch (I->op) { /* Pseudoinstructions for RA must be removed now */ case AGX_OPCODE_PHI: - case AGX_OPCODE_LOGICAL_END: case AGX_OPCODE_PRELOAD: agx_remove_instruction(I); break;