[llvm-branch-commits] [llvm] [AMDGPU][InsertWaitCnts] Track global_wb/inv/wbinv (PR #135340)

Jay Foad via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Apr 22 03:01:32 PDT 2025


================
@@ -2130,13 +2140,14 @@ void SIInsertWaitcnts::updateEventWaitcntAfter(MachineInstr &Inst,
       ScoreBrackets->updateByEvent(TII, TRI, MRI, LDS_ACCESS, Inst);
     }
   } else if (TII->isFLAT(Inst)) {
-    // TODO: Track this properly.
-    if (isCacheInvOrWBInst(Inst))
+    if (isGFX12CacheInvOrWBInst(Inst)) {
+      ScoreBrackets->updateByEvent(TII, TRI, MRI, getVmemWaitEventType(Inst),
+                                   Inst);
       return;
-
-    assert(Inst.mayLoadOrStore());
+    }
 
     int FlatASCount = 0;
+    assert(Inst.mayLoadOrStore());
----------------
jayfoad wrote:

Nit: why move this?

https://github.com/llvm/llvm-project/pull/135340


More information about the llvm-branch-commits mailing list