[PATCH] D20556: AMDGPU: Skip waiting on lgkmcnt for global flat loads
Tom Stellard via llvm-commits
llvm-commits at lists.llvm.org
Tue May 24 17:36:46 PDT 2016
tstellarAMD 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 {
----------------
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.
http://reviews.llvm.org/D20556
More information about the llvm-commits
mailing list