[PATCH] D100281: [AMDGPU] Revise handling of preexisting waitcnt

Austin Kerbow via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 12 11:54:24 PDT 2021


kerbowa added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp:814
+       &*II != MI; II = NextI, ++NextI) {
+    if (II->isDebugInstr())
+      continue;
----------------
rampitec wrote:
> isMetaInstruction() probably?
thanks.


================
Comment at: llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp:1158
+  // Verify that the wait is actually needed.
+  ScoreBrackets.simplifyWaitcnt(Wait);
 
----------------
rampitec wrote:
> We probably still want to support forced waitcounts for debugging purposes. A debug trap for memory violation usually happens at a wait count, so it is easier to debug with explicit waits for each memory access.
I tried to make sure forced waitcnt still works.


================
Comment at: llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp:1601
+
+  if (!MFI->isEntryFunction()) {
+    // Wait for any outstanding memory operations that the input registers may
----------------
rampitec wrote:
> Isn't it a separate change?
Sure, I can separate the changes.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100281/new/

https://reviews.llvm.org/D100281



More information about the llvm-commits mailing list