[llvm] [AMDGPU] Add eventMask function in WaitcntGenerator class (NFC) (PR #85210)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 14 06:49:09 PDT 2024


================
@@ -485,6 +485,15 @@ class WaitcntGenerator {
   virtual AMDGPU::Waitcnt getAllZeroWaitcnt(bool IncludeVSCnt) const = 0;
 
   virtual ~WaitcntGenerator() = default;
+
+  // Create a mask value from the initializer list of wait event types.
+  unsigned eventMask(std::initializer_list<WaitEventType> Events) const {
----------------
jayfoad wrote:

Doesn't this function need to be constexpr to let you use it in the initializer of static data? (I am not a C++ expert!)

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


More information about the llvm-commits mailing list