[clang] [llvm] [AMDGPU][SIInsertWaitcnt] Implement Waitcnt Expansion for Profiling (PR #169345)

Pankaj Dwivedi via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 5 08:29:41 PST 2026


================
@@ -297,6 +302,34 @@ class WaitcntGenerator {
   // optimization.
   bool isOptNone() const { return OptNone; }
 
+  // Get the maximum wait count value for a given counter type.
+  // For pre-GFX12, LOAD_CNT uses vmcnt and DS_CNT uses lgkmcnt.
+  // For GFX12+, LOAD_CNT uses loadcnt and DS_CNT uses dscnt.
+  unsigned getWaitCountMax(InstCounterType T) const {
----------------
PankajDwivedi-25 wrote:

I have addressed the change in the recent patch.

https://github.com/llvm/llvm-project/pull/169345


More information about the cfe-commits mailing list