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

Juan Manuel Martinez CaamaƱo via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 2 06:18:08 PST 2026


jmmartinez wrote:

> I understand that we can do without iterators, but I think it's expected from a container to provide iterators, otherwise it's incomplete.

I see your point but this is not a generic container. It's used in a narrow context.

>  If you don't provide iterators you force the user to come up with their own ways of iterating through the elements and you end up with repeated boilerplate code.

We cannot predict how this code is going to be used in the future. I think that lean code would allow for easier refactoring when the time comes.

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


More information about the llvm-commits mailing list