[all-commits] [llvm/llvm-project] de111c: [AMDGCN] pre-checkin test for LDS DMA and release ...

Sameer Sahasrabuddhe via All-commits all-commits at lists.llvm.org
Mon Jul 7 02:06:42 PDT 2025


  Branch: refs/heads/users/ssahasra/waitcnt-lds-direct
  Home:   https://github.com/llvm/llvm-project
  Commit: de111cd96570df7127722cb7df476cb833694f72
      https://github.com/llvm/llvm-project/commit/de111cd96570df7127722cb7df476cb833694f72
  Author: Sameer Sahasrabuddhe <sameer.sahasrabuddhe at amd.com>
  Date:   2025-07-07 (Mon, 07 Jul 2025)

  Changed paths:
    A llvm/test/CodeGen/AMDGPU/lds-dma-workgroup-release.ll

  Log Message:
  -----------
  [AMDGCN] pre-checkin test for LDS DMA and release operations


  Commit: 9b0cdd6e91409aec3429c8a2ca8df75e15d4f4e2
      https://github.com/llvm/llvm-project/commit/9b0cdd6e91409aec3429c8a2ca8df75e15d4f4e2
  Author: Sameer Sahasrabuddhe <sameer.sahasrabuddhe at amd.com>
  Date:   2025-07-07 (Mon, 07 Jul 2025)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
    M llvm/test/CodeGen/AMDGPU/lds-dma-workgroup-release.ll

  Log Message:
  -----------
  [AMDGPU] efficiently wait for direct loads to LDS at all scopes

Currently, the memory legalizer does not generate any wait on vmcnt at workgroup
scope. This is incorrect because direct loads to LDS are tracked using vmcnt and
they need to be released properly at workgroup scope.

The memory legalizer was previously updated to always emit a soft wait
instruction even when all counts are trivially ~0. SIInsertWaitcnts now examines
pending loads to LDS at each S_WAITCNT_soft instruction. If such instructions
exist, the vmcnt (which could be ~0) is upgraded to a value that wiats for any
such pending loads to LDS. After that, any soft instruction that has only
trivial ~0 counts is automatically dropped.

Thus, common programs that do not use direct loads to LDS remain unaffected, but
programs that do use such loads see a correct and efficient vmcnt even at
workgroup scope.


Compare: https://github.com/llvm/llvm-project/compare/de111cd96570%5E...9b0cdd6e9140

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list