A bitvector that coalesces adjacent set bits into intervals.
Declared in <llvm/ADT/CoalescingBitVector.h>
template<typename IndexT>
class CoalescingBitVector;
Relies on an IntervalMap under the hood. Good for representing sets which predominantly contain contiguous ranges. Bad for representing sets with lots of gaps between elements.
Compared to SparseBitVector, CoalescingBitVector offers more predictable performance for non-sequential find() operations.
| Name | Description |
|---|---|
const_iterator | Forward iterator over the set bit indices in ascending order. |
| Name | Description |
|---|---|
Allocator | Allocator type used by the underlying IntervalMap. |
| Name | Description |
|---|---|
CoalescingBitVector [constructor] | Constructors |
operator= | Assignment operators |
begin | Return an iterator to the first set bit. |
clear | Clear all the bits. |
count | Count the number of set bits. |
dump | Dump the bitvector contents to the debug stream. |
empty | Check whether no bits are set. |
end | Return an end iterator past the last set bit. |
find | Return an iterator to the first set bit at or after Index. |
half_open_range | Return a range iterator which iterates over all of the set bits in the half-open range [Start, End).] |
intersectWithComplement | Reset all bits present in Other. |
operator&= | Set intersection. |
operator|= | Set union. If RHS is guaranteed to not overlap with this, set may be a faster alternative. |
print | Print the coalesced intervals to OS. |
reset | Reset the bit at Index. Supports resetting an already-unset bit. |
set | set overloads |
test | Check whether the bit at Index is set. |
test_and_set | Set the bit at Index. Supports setting an already-set bit. |
operator== | Return true if this bitvector has the same set bits as RHS. |
operator!= | Return true if this bitvector differs from RHS. |
| Name | Description |
|---|---|
| IndexT | - The type of the index into the bitvector. |