From 0c7bed72f7948d51a2109f181e7a2d3c77dbd19e Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Thu, 7 May 2020 15:02:20 +0100 Subject: [PATCH] aco: simplify consecutive ordered vmem/lds writes optimization MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This was unnecessary and messed with statistics Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_insert_waitcnt.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/amd/compiler/aco_insert_waitcnt.cpp b/src/amd/compiler/aco_insert_waitcnt.cpp index e4087e7add5..4a8596b5af8 100644 --- a/src/amd/compiler/aco_insert_waitcnt.cpp +++ b/src/amd/compiler/aco_insert_waitcnt.cpp @@ -402,22 +402,14 @@ wait_imm check_instr(Instruction* instr, wait_ctx& ctx) continue; /* Vector Memory reads and writes return in the order they were issued */ - if (instr->isVMEM() && ((it->second.events & vm_events) == event_vmem)) { - it->second.remove_counter(counter_vm); - if (!it->second.counters) - it = ctx.gpr_map.erase(it); + if (instr->isVMEM() && ((it->second.events & vm_events) == event_vmem)) continue; - } /* LDS reads and writes return in the order they were issued. same for GDS */ if (instr->format == Format::DS) { bool gds = static_cast(instr)->gds; - if ((it->second.events & lgkm_events) == (gds ? event_gds : event_lds)) { - it->second.remove_counter(counter_lgkm); - if (!it->second.counters) - it = ctx.gpr_map.erase(it); + if ((it->second.events & lgkm_events) == (gds ? event_gds : event_lds)) continue; - } } wait.combine(it->second.imm); -- 2.30.2