aco: simplify consecutive ordered vmem/lds writes optimization
authorRhys Perry <pendingchaos02@gmail.com>
Thu, 7 May 2020 14:02:20 +0000 (15:02 +0100)
committerMarge Bot <eric+marge@anholt.net>
Wed, 13 May 2020 12:26:42 +0000 (12:26 +0000)
This was unnecessary and messed with statistics

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4949>

src/amd/compiler/aco_insert_waitcnt.cpp

index e4087e7add59b8f007c20c18050632858be0402a..4a8596b5af8a44a71d48288d5c805a64953b5de5 100644 (file)
@@ -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<DS_instruction*>(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);