[llvm] [AMDGPU][SIInsertWaitcnts] WaitEventSet const_iterator (PR #182965)

via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 2 09:48:04 PST 2026


vporpo wrote:

> Maybe it should just be a std::bitset instead of inventing a new thing.

Using an existing container would be the best option. 

The only concerns are:
- performance: we are operating on a single unsigned integer for all operations. Not sure generic containers would be as efficent.
- we are using some non-standard functions like `twoOrMore()` 
- our API functions use WaitEventType instead of integers, like `set(WaitEventType E)` instead of `set(unsigned Idx)`, which is better for type safety.
- we have a nice printer

We could inherit from llvm::Bitset or std::bitset and provide the missing functionality.

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


More information about the llvm-commits mailing list