[clang] [llvm] [AMDGPU] Introduce asyncmark/wait intrinsics (PR #173259)
Nicolai Hähnle via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 2 11:47:43 PST 2026
================
@@ -653,6 +677,11 @@ class WaitcntBrackets {
return It != VMem.end() ? It->second.Scores[T] : 0;
}
+ unsigned getClampedWait(InstCounterType T, unsigned ScoreToWait) const {
+ return std::min(getScoreUB(T) - ScoreToWait,
+ Context->getWaitCountMax(T) - 1);
+ }
----------------
nhaehnle wrote:
nit: Perhaps this check could just be integrated into `addWait` instead? Or presumably it'd then be a method `addWaitCount` versus an `addWaitScore`?
https://github.com/llvm/llvm-project/pull/173259
More information about the llvm-commits
mailing list