[PATCH] D20556: AMDGPU: Skip waiting on lgkmcnt for global flat loads

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue May 24 17:39:38 PDT 2016


arsenm added inline comments.

================
Comment at: lib/Target/AMDGPU/SIInsertWaits.cpp:221-225
@@ -210,2 +220,7 @@
       }
+    } else if (TII->isFLAT(MI)) {
+      // If we know the pointer is not accessing a flat address, we don't need
+      // to wait for lgkm.
+      if (!hasGlobalMemOperand(MI))
+        Result.Named.LGKM = 1;
     } else {
----------------
tstellarAMD wrote:
> I'm not really sure exactly what this is doing, but as long as this accounts for the fact that the hw LGKM counter is always incremented even if the operation  accesses global memory than this is fine.
> 
> Though, I think you should add some tests that have lds operations before and after  a flat instruction that accesses global memory.
I don't think this is accounting for the hardware increase


http://reviews.llvm.org/D20556





More information about the llvm-commits mailing list