|
LLVM
3.7.0
|
SmallBitVector - This is a 'bitvector' (really, a variable-sized bit array), optimized for the case when the array is small. More...
#include <SmallBitVector.h>
Classes | |
| class | reference |
Public Types | |
| typedef unsigned | size_type |
Public Member Functions | |
| SmallBitVector () | |
| SmallBitVector default ctor - Creates an empty bitvector. More... | |
| SmallBitVector (unsigned s, bool t=false) | |
| SmallBitVector ctor - Creates a bitvector of specified number of bits. More... | |
| SmallBitVector (const SmallBitVector &RHS) | |
| SmallBitVector copy ctor. More... | |
| SmallBitVector (SmallBitVector &&RHS) | |
| ~SmallBitVector () | |
| bool | empty () const |
| empty - Tests whether there are no bits in this bitvector. More... | |
| size_t | size () const |
| size - Returns the number of bits in this bitvector. More... | |
| size_type | count () const |
| count - Returns the number of bits which are set. More... | |
| bool | any () const |
| any - Returns true if any bit is set. More... | |
| bool | all () const |
| all - Returns true if all bits are set. More... | |
| bool | none () const |
| none - Returns true if none of the bits are set. More... | |
| int | find_first () const |
| find_first - Returns the index of the first set bit, -1 if none of the bits are set. More... | |
| int | find_next (unsigned Prev) const |
| find_next - Returns the index of the next set bit following the "Prev" bit. More... | |
| void | clear () |
| clear - Clear all bits. More... | |
| void | resize (unsigned N, bool t=false) |
| resize - Grow or shrink the bitvector. More... | |
| void | reserve (unsigned N) |
| SmallBitVector & | set () |
| SmallBitVector & | set (unsigned Idx) |
| SmallBitVector & | set (unsigned I, unsigned E) |
| set - Efficiently set a range of bits in [I, E) More... | |
| SmallBitVector & | reset () |
| SmallBitVector & | reset (unsigned Idx) |
| SmallBitVector & | reset (unsigned I, unsigned E) |
| reset - Efficiently reset a range of bits in [I, E) More... | |
| SmallBitVector & | flip () |
| SmallBitVector & | flip (unsigned Idx) |
| SmallBitVector | operator~ () const |
| reference | operator[] (unsigned Idx) |
| bool | operator[] (unsigned Idx) const |
| bool | test (unsigned Idx) const |
| bool | anyCommon (const SmallBitVector &RHS) const |
| Test if any common bits are set. More... | |
| bool | operator== (const SmallBitVector &RHS) const |
| bool | operator!= (const SmallBitVector &RHS) const |
| SmallBitVector & | operator&= (const SmallBitVector &RHS) |
| SmallBitVector & | reset (const SmallBitVector &RHS) |
| reset - Reset bits that are set in RHS. Same as *this &= ~RHS. More... | |
| bool | test (const SmallBitVector &RHS) const |
| test - Check if (This - RHS) is zero. More... | |
| SmallBitVector & | operator|= (const SmallBitVector &RHS) |
| SmallBitVector & | operator^= (const SmallBitVector &RHS) |
| const SmallBitVector & | operator= (const SmallBitVector &RHS) |
| const SmallBitVector & | operator= (SmallBitVector &&RHS) |
| void | swap (SmallBitVector &RHS) |
| void | setBitsInMask (const uint32_t *Mask, unsigned MaskWords=~0u) |
| setBitsInMask - Add '1' bits from Mask to this vector. More... | |
| void | clearBitsInMask (const uint32_t *Mask, unsigned MaskWords=~0u) |
| clearBitsInMask - Clear any bits in this vector that are set in Mask. More... | |
| void | setBitsNotInMask (const uint32_t *Mask, unsigned MaskWords=~0u) |
| setBitsNotInMask - Add a bit to this vector for every '0' bit in Mask. More... | |
| void | clearBitsNotInMask (const uint32_t *Mask, unsigned MaskWords=~0u) |
| clearBitsNotInMask - Clear a bit in this vector for every '0' bit in Mask. More... | |
SmallBitVector - This is a 'bitvector' (really, a variable-sized bit array), optimized for the case when the array is small.
It contains one pointer-sized field, which is directly used as a plain collection of bits when possible, or as a pointer to a larger heap-allocated array when necessary. This allows normal "small" cases to be fast without losing generality for large inputs.
Definition at line 31 of file SmallBitVector.h.
Definition at line 57 of file SmallBitVector.h.
|
inline |
SmallBitVector default ctor - Creates an empty bitvector.
Definition at line 143 of file SmallBitVector.h.
Referenced by operator~().
SmallBitVector ctor - Creates a bitvector of specified number of bits.
All bits are initialized to the specified value.
Definition at line 147 of file SmallBitVector.h.
|
inline |
SmallBitVector copy ctor.
Definition at line 155 of file SmallBitVector.h.
|
inline |
Definition at line 162 of file SmallBitVector.h.
|
inline |
Definition at line 166 of file SmallBitVector.h.
|
inline |
all - Returns true if all bits are set.
Definition at line 198 of file SmallBitVector.h.
References llvm::BitVector::all().
Referenced by lowerVectorShuffle(), and lowerVectorShuffleWithSSE4A().
|
inline |
any - Returns true if any bit is set.
Definition at line 191 of file SmallBitVector.h.
References llvm::BitVector::any().
Referenced by llvm::DwarfExpression::AddMachineRegPiece(), llvm::DependenceAnalysis::depends(), and llvm::DependenceAnalysis::getSplitIteration().
|
inline |
Test if any common bits are set.
Definition at line 384 of file SmallBitVector.h.
References llvm::BitVector::anyCommon(), fuzzer::min(), size(), and test().
|
inline |
|
inline |
clearBitsInMask - Clear any bits in this vector that are set in Mask.
Don't resize. This computes "*this &= ~Mask".
Definition at line 528 of file SmallBitVector.h.
References llvm::BitVector::clearBitsInMask().
|
inline |
clearBitsNotInMask - Clear a bit in this vector for every '0' bit in Mask.
Don't resize. This computes "*this &= Mask".
Definition at line 546 of file SmallBitVector.h.
References llvm::BitVector::clearBitsNotInMask().
|
inline |
count - Returns the number of bits which are set.
Definition at line 182 of file SmallBitVector.h.
References llvm::tgtok::Bits, llvm::BitVector::count(), and llvm::countPopulation().
Referenced by llvm::DependenceAnalysis::depends(), llvm::DependenceAnalysis::getSplitIteration(), and lowerVectorShuffleAsSplitOrBlend().
|
inline |
empty - Tests whether there are no bits in this bitvector.
Definition at line 172 of file SmallBitVector.h.
References llvm::BitVector::empty().
|
inline |
find_first - Returns the index of the first set bit, -1 if none of the bits are set.
Definition at line 213 of file SmallBitVector.h.
References llvm::tgtok::Bits, llvm::countTrailingZeros(), and llvm::BitVector::find_first().
Referenced by llvm::DependenceAnalysis::depends(), dumpSmallBitVector(), and llvm::DependenceAnalysis::getSplitIteration().
find_next - Returns the index of the next set bit following the "Prev" bit.
Returns -1 if the next set bit is not found.
Definition at line 225 of file SmallBitVector.h.
References llvm::tgtok::Bits, llvm::countTrailingZeros(), and llvm::BitVector::find_next().
Referenced by llvm::DependenceAnalysis::depends(), dumpSmallBitVector(), and llvm::DependenceAnalysis::getSplitIteration().
|
inline |
Definition at line 345 of file SmallBitVector.h.
References llvm::BitVector::flip().
|
inline |
Definition at line 353 of file SmallBitVector.h.
References llvm::BitVector::flip().
|
inline |
none - Returns true if none of the bits are set.
Definition at line 205 of file SmallBitVector.h.
References llvm::BitVector::none().
|
inline |
Definition at line 406 of file SmallBitVector.h.
|
inline |
Definition at line 411 of file SmallBitVector.h.
|
inline |
Definition at line 488 of file SmallBitVector.h.
|
inline |
Definition at line 505 of file SmallBitVector.h.
|
inline |
Definition at line 397 of file SmallBitVector.h.
References size().
Definition at line 367 of file SmallBitVector.h.
References size().
Definition at line 372 of file SmallBitVector.h.
References size().
|
inline |
Definition at line 473 of file SmallBitVector.h.
|
inline |
Definition at line 459 of file SmallBitVector.h.
|
inline |
Definition at line 362 of file SmallBitVector.h.
References SmallBitVector().
|
inline |
Definition at line 261 of file SmallBitVector.h.
References llvm::BitVector::reserve(), and llvm::BitVector::set().
|
inline |
Definition at line 314 of file SmallBitVector.h.
References llvm::BitVector::reset().
Referenced by llvm::DependenceAnalysis::depends(), llvm::DependenceAnalysis::getSplitIteration(), llvm::SmallBitVector::reference::operator=(), reset(), and simplifyShuffleOperandRecursively().
|
inline |
Definition at line 322 of file SmallBitVector.h.
References llvm::BitVector::reset().
|
inline |
reset - Efficiently reset a range of bits in [I, E)
Definition at line 331 of file SmallBitVector.h.
References I, llvm::BitVector::reset(), and size().
|
inline |
reset - Reset bits that are set in RHS. Same as *this &= ~RHS.
Definition at line 426 of file SmallBitVector.h.
References fuzzer::min(), llvm::BitVector::reset(), reset(), size(), and test().
resize - Grow or shrink the bitvector.
Definition at line 245 of file SmallBitVector.h.
References llvm::BitVector::resize().
Referenced by lowerVectorShuffleAsSplitOrBlend(), operator&=(), operator^=(), and operator|=().
|
inline |
Definition at line 279 of file SmallBitVector.h.
References llvm::BitVector::set().
Referenced by llvm::DwarfExpression::AddMachineRegPiece(), llvm::DependenceAnalysis::depends(), llvm::DependenceAnalysis::getSplitIteration(), and llvm::SmallBitVector::reference::operator=().
|
inline |
Definition at line 287 of file SmallBitVector.h.
References llvm::BitVector::set().
|
inline |
set - Efficiently set a range of bits in [I, E)
Definition at line 300 of file SmallBitVector.h.
References I, llvm::BitVector::set(), and size().
setBitsInMask - Add '1' bits from Mask to this vector.
Don't resize. This computes "*this |= Mask".
Definition at line 519 of file SmallBitVector.h.
References llvm::BitVector::setBitsInMask().
|
inline |
setBitsNotInMask - Add a bit to this vector for every '0' bit in Mask.
Don't resize. This computes "*this |= ~Mask".
Definition at line 537 of file SmallBitVector.h.
References llvm::BitVector::setBitsNotInMask().
|
inline |
size - Returns the number of bits in this bitvector.
Definition at line 177 of file SmallBitVector.h.
References llvm::BitVector::size().
Referenced by anyCommon(), operator&=(), operator==(), operator[](), operator^=(), operator|=(), reset(), set(), and test().
|
inline |
Definition at line 513 of file SmallBitVector.h.
References std::swap().
Referenced by operator=(), and std::swap().
Definition at line 379 of file SmallBitVector.h.
Referenced by anyCommon(), reset(), and test().
|
inline |
test - Check if (This - RHS) is zero.
This is the same as reset(RHS) and any().
Definition at line 441 of file SmallBitVector.h.
References fuzzer::min(), size(), llvm::BitVector::test(), and test().
1.8.6