[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 14 09:28:49 PDT 2024


================
@@ -4914,6 +4920,78 @@ class FunctionEffectsRef {
   void dump(llvm::raw_ostream &OS) const;
 };
 
+/// A mutable set of FunctionEffect::Kind.
+class FunctionEffectKindSet {
----------------
Sirraide wrote:

> but that doesn't help with the problem of iterating through the set bits

Ah, I missed the fact that `std::bitset` doesn’t have iterators. I also just saw that the iteration logic is also a bit more advanced than just returning every element, so that’ll probably have to stay. 

(I can probably think of a way to mess around w/ `filter`, `enumerate` and `map_range` to get this to work if we had a bitset iterator, but I’m not sure it’s worth the effort; there is `llvm::Bitset`, but that doesn’t have iterators either...)

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


More information about the cfe-commits mailing list