[llvm] [AMDGPU][SIInsertWaitcnts][NFC] Drop MaxCounter member variable (PR #181092)

Ryan Mitchell via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 12 10:49:11 PST 2026


================
@@ -2999,7 +3014,8 @@ bool WaitcntBrackets::mergeAsyncMarks(ArrayRef<MergeInfo> MergeInfos,
   unsigned MergeCount = std::min(OtherSize, OurSize);
   assert(OurSize == MaxSize);
   for (unsigned Idx = 1; Idx <= MergeCount; ++Idx) {
-    for (auto T : inst_counter_types(Context->MaxCounter)) {
+    for (auto T : inst_counter_types(
+             getMaxCounter(*Context->ST, Context->IsExpertMode))) {
----------------
RyanRio wrote:

Nit - You could move this getMaxCounter call above the outer loop

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


More information about the llvm-commits mailing list