[Mlir-commits] [clang] [llvm] [mlir] [AMDGPU] Implement AsyncMark Stages (PR #220442)

Sameer Sahasrabuddhe llvmlistbot at llvm.org
Mon Nov 2 21:37:35 PST 2026


================
@@ -1387,44 +1374,54 @@ void WaitcntBrackets::determineWaitForScore(AMDGPU::InstCounterType T,
   }
 }
 
-AMDGPU::Waitcnt WaitcntBrackets::determineAsyncWait(unsigned N) {
-  LLVM_DEBUG({
-    dbgs() << "Need " << N << " async marks. Found " << AsyncMarks.size()
-           << ":\n";
-    for (const auto &Mark : AsyncMarks) {
-      llvm::interleaveComma(Mark, dbgs());
-      dbgs() << '\n';
-    }
-  });
+AMDGPU::Waitcnt
+WaitcntBrackets::determineAsyncWait(unsigned N, AMDGPU::AsyncStages Stages) {
+  // Trim each stage the wait names down to at most N marks. The waits
+  // implied by the marks dropped from each stage accumulate into one Waitcnt,
----------------
ssahasra wrote:

```suggestion
  // Trim each named stage to at most N marks. The dropped marks imply waits
  // that get accumulated into one Waitcnt,
```
Rewording for readability.

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


More information about the Mlir-commits mailing list