================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to