[all-commits] [llvm/llvm-project] ef7de8: [AMDGPU] Remove scope check in SIInsertWaitcnts::g...
choikwa via All-commits
all-commits at lists.llvm.org
Fri Sep 12 11:51:59 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ef7de8d1447c822dec72d685d85053216936b895
https://github.com/llvm/llvm-project/commit/ef7de8d1447c822dec72d685d85053216936b895
Author: choikwa <5455710+choikwa at users.noreply.github.com>
Date: 2025-09-12 (Fri, 12 Sep 2025)
Changed paths:
M llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
M llvm/test/CodeGen/AMDGPU/waitcnt-unscoped.ll
Log Message:
-----------
[AMDGPU] Remove scope check in SIInsertWaitcnts::generateWaitcntInstBefore (#157821)
This change was motivated by CK where many VMCNT(0)'s were generated due
to instructions lacking !alias.scope metadata. The two causes of this
were:
1) LowerLDSModule not tacking on scope metadata on a single LDS variable
2) IPSCCP pass before inliner replacing noalias ptr derivative with a
global value, which made inliner unable to track it back to the noalias
ptr argument.
However, it turns out that IPSCCP losing the scope information was
largely ineffectual as ScopedNoAliasAA was able to handle asymmetric
condition, where one MemLoc was missing scope, and still return NoAlias
result.
AMDGPU however was checking for existence of scope in SIInsertWaitcnts
and conservatively treating it as aliasing all and inserted VMCNT(0)
before DS_READs, forcing it to wait for all previous LDS DMA
instructions.
Since we know that ScopedNoAliasAA can handle asymmetry, we should also
allow AA query to determine if two MIs may alias.
Passed PSDB.
Previous attempt to address the issue in IPSCCP, likely stalled:
https://github.com/llvm/llvm-project/pull/154522
This solution may be preferrable over that as issue only affects AMDGPU.
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