[PATCH] D102252: [AMDGPU] Fix extra waitcnt being added with BUFFER_INVL2

Tony Tye via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 11 12:51:01 PDT 2021


t-tye added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp:1323
   } else if (SIInstrInfo::isVMEM(Inst) &&
-             // TODO: get a better carve out.
-             Inst.getOpcode() != AMDGPU::BUFFER_WBINVL1 &&
-             Inst.getOpcode() != AMDGPU::BUFFER_WBINVL1_SC &&
-             Inst.getOpcode() != AMDGPU::BUFFER_WBINVL1_VOL &&
-             Inst.getOpcode() != AMDGPU::BUFFER_GL0_INV &&
-             Inst.getOpcode() != AMDGPU::BUFFER_GL1_INV) {
+             !llvm::AMDGPU::getMUBUFIsBufferInv(Inst.getOpcode())) {
     if (!ST->hasVscnt())
----------------
Is this the right query? Or is the query really asking if the instruction requires the vmem counts to be tracked? Should the writeback also be handled here? Are invalidate/writeback considered to load/store memory?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102252



More information about the llvm-commits mailing list