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

Austin Kerbow via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 11 21:28:45 PDT 2021


kerbowa created this revision.
kerbowa added reviewers: rampitec, t-tye, arsenm.
Herald added subscribers: hiraditya, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl.
kerbowa requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

Preexisting waitcnt may not update the scoreboard if the instruction
being examined needed to wait on fewer counters than what was encoded in
the old waitcnt instruction. Fixing this results in the elimination of
some redudnat waitcnt.

These changes also enable combining consecutive waitcnt into a single
S_WAITCNT or S_WAITCNT_VSCNT instruction.

Additionally move the code earlier that inserts waitcnt at function
entry. This allows combining more waticnt in some tests.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D100281

Files:
  llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
  llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
  llvm/test/CodeGen/AMDGPU/GlobalISel/flat-scratch.ll
  llvm/test/CodeGen/AMDGPU/atomicrmw-nand.ll
  llvm/test/CodeGen/AMDGPU/flat-scratch.ll
  llvm/test/CodeGen/AMDGPU/fp64-atomics-gfx90a.ll
  llvm/test/CodeGen/AMDGPU/llvm.amdgcn.ds.gws.barrier.ll
  llvm/test/CodeGen/AMDGPU/memory-legalizer-flat-agent.ll
  llvm/test/CodeGen/AMDGPU/memory-legalizer-flat-system.ll
  llvm/test/CodeGen/AMDGPU/memory-legalizer-flat-volatile.ll
  llvm/test/CodeGen/AMDGPU/memory-legalizer-flat-workgroup.ll
  llvm/test/CodeGen/AMDGPU/waitcnt-debug.mir
  llvm/test/CodeGen/AMDGPU/waitcnt-preexisting-vscnt.mir
  llvm/test/CodeGen/AMDGPU/waitcnt-preexisting.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100281.336739.patch
Type: text/x-patch
Size: 69046 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210412/eef99cec/attachment.bin>


More information about the llvm-commits mailing list