LLVM API Documentation
#include <SmallBitVector.h>
Classes | |
class | reference |
Public Types | |
typedef unsigned | size_type |
Public Member Functions | |
SmallBitVector () | |
SmallBitVector default ctor - Creates an empty bitvector. | |
SmallBitVector (unsigned s, bool t=false) | |
SmallBitVector (const SmallBitVector &RHS) | |
SmallBitVector copy ctor. | |
SmallBitVector (SmallBitVector &&RHS) | |
~SmallBitVector () | |
bool | empty () const |
empty - Tests whether there are no bits in this bitvector. | |
size_t | size () const |
size - Returns the number of bits in this bitvector. | |
size_type | count () const |
count - Returns the number of bits which are set. | |
bool | any () const |
any - Returns true if any bit is set. | |
bool | all () const |
all - Returns true if all bits are set. | |
bool | none () const |
none - Returns true if none of the bits are set. | |
int | find_first () const |
int | find_next (unsigned Prev) const |
void | clear () |
clear - Clear all bits. | |
void | resize (unsigned N, bool t=false) |
resize - Grow or shrink the bitvector. | |
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) | |
SmallBitVector & | reset () |
SmallBitVector & | reset (unsigned Idx) |
SmallBitVector & | reset (unsigned I, unsigned E) |
reset - Efficiently reset a range of bits in [I, E) | |
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. | |
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. | |
bool | test (const SmallBitVector &RHS) const |
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) |
void | clearBitsInMask (const uint32_t *Mask, unsigned MaskWords=~0u) |
void | setBitsNotInMask (const uint32_t *Mask, unsigned MaskWords=~0u) |
void | clearBitsNotInMask (const uint32_t *Mask, unsigned MaskWords=~0u) |
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.
llvm::SmallBitVector::SmallBitVector | ( | ) | [inline] |
SmallBitVector default ctor - Creates an empty bitvector.
Definition at line 138 of file SmallBitVector.h.
Referenced by operator~().
llvm::SmallBitVector::SmallBitVector | ( | unsigned | s, |
bool | t = false |
||
) | [inline, explicit] |
SmallBitVector ctor - Creates a bitvector of specified number of bits. All bits are initialized to the specified value.
Definition at line 142 of file SmallBitVector.h.
llvm::SmallBitVector::SmallBitVector | ( | const SmallBitVector & | RHS | ) | [inline] |
SmallBitVector copy ctor.
Definition at line 150 of file SmallBitVector.h.
llvm::SmallBitVector::SmallBitVector | ( | SmallBitVector && | RHS | ) | [inline] |
Definition at line 157 of file SmallBitVector.h.
llvm::SmallBitVector::~SmallBitVector | ( | ) | [inline] |
Definition at line 161 of file SmallBitVector.h.
bool llvm::SmallBitVector::all | ( | ) | const [inline] |
all - Returns true if all bits are set.
Definition at line 197 of file SmallBitVector.h.
References llvm::BitVector::all().
bool llvm::SmallBitVector::any | ( | ) | const [inline] |
any - Returns true if any bit is set.
Definition at line 190 of file SmallBitVector.h.
References llvm::BitVector::any().
Referenced by llvm::DependenceAnalysis::depends(), llvm::AsmPrinter::EmitDwarfRegOpPiece(), and llvm::DependenceAnalysis::getSplitIteration().
bool llvm::SmallBitVector::anyCommon | ( | const SmallBitVector & | RHS | ) | const [inline] |
Test if any common bits are set.
Definition at line 387 of file SmallBitVector.h.
References llvm::BitVector::anyCommon(), size(), and test().
void llvm::SmallBitVector::clear | ( | ) | [inline] |
void llvm::SmallBitVector::clearBitsInMask | ( | const uint32_t * | Mask, |
unsigned | MaskWords = ~0u |
||
) | [inline] |
clearBitsInMask - Clear any bits in this vector that are set in Mask. Don't resize. This computes "*this &= ~Mask".
Definition at line 531 of file SmallBitVector.h.
References llvm::BitVector::clearBitsInMask().
void llvm::SmallBitVector::clearBitsNotInMask | ( | const uint32_t * | Mask, |
unsigned | MaskWords = ~0u |
||
) | [inline] |
clearBitsNotInMask - Clear a bit in this vector for every '0' bit in Mask. Don't resize. This computes "*this &= Mask".
Definition at line 549 of file SmallBitVector.h.
References llvm::BitVector::clearBitsNotInMask().
size_type llvm::SmallBitVector::count | ( | ) | const [inline] |
count - Returns the number of bits which are set.
Definition at line 177 of file SmallBitVector.h.
References llvm::tgtok::Bits, llvm::BitVector::count(), llvm::CountPopulation_32(), llvm::CountPopulation_64(), and llvm_unreachable.
Referenced by llvm::DependenceAnalysis::depends(), and llvm::DependenceAnalysis::getSplitIteration().
bool llvm::SmallBitVector::empty | ( | ) | const [inline] |
empty - Tests whether there are no bits in this bitvector.
Definition at line 167 of file SmallBitVector.h.
References llvm::BitVector::empty().
int llvm::SmallBitVector::find_first | ( | ) | const [inline] |
find_first - Returns the index of the first set bit, -1 if none of the bits are set.
Definition at line 212 of file SmallBitVector.h.
References llvm::tgtok::Bits, llvm::countTrailingZeros(), llvm::BitVector::find_first(), and llvm_unreachable.
Referenced by llvm::DependenceAnalysis::depends(), dumpSmallBitVector(), and llvm::DependenceAnalysis::getSplitIteration().
int llvm::SmallBitVector::find_next | ( | unsigned | Prev | ) | const [inline] |
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 228 of file SmallBitVector.h.
References llvm::tgtok::Bits, llvm::countTrailingZeros(), llvm::BitVector::find_next(), and llvm_unreachable.
Referenced by llvm::DependenceAnalysis::depends(), dumpSmallBitVector(), and llvm::DependenceAnalysis::getSplitIteration().
SmallBitVector& llvm::SmallBitVector::flip | ( | ) | [inline] |
Definition at line 348 of file SmallBitVector.h.
References llvm::BitVector::flip().
SmallBitVector& llvm::SmallBitVector::flip | ( | unsigned | Idx | ) | [inline] |
Definition at line 356 of file SmallBitVector.h.
References llvm::BitVector::flip().
bool llvm::SmallBitVector::none | ( | ) | const [inline] |
none - Returns true if none of the bits are set.
Definition at line 204 of file SmallBitVector.h.
References llvm::BitVector::none().
bool llvm::SmallBitVector::operator!= | ( | const SmallBitVector & | RHS | ) | const [inline] |
Definition at line 409 of file SmallBitVector.h.
SmallBitVector& llvm::SmallBitVector::operator&= | ( | const SmallBitVector & | RHS | ) | [inline] |
Definition at line 414 of file SmallBitVector.h.
const SmallBitVector& llvm::SmallBitVector::operator= | ( | const SmallBitVector & | RHS | ) | [inline] |
Definition at line 491 of file SmallBitVector.h.
const SmallBitVector& llvm::SmallBitVector::operator= | ( | SmallBitVector && | RHS | ) | [inline] |
Definition at line 508 of file SmallBitVector.h.
bool llvm::SmallBitVector::operator== | ( | const SmallBitVector & | RHS | ) | const [inline] |
Definition at line 400 of file SmallBitVector.h.
References size().
Definition at line 370 of file SmallBitVector.h.
References size().
Definition at line 375 of file SmallBitVector.h.
References size().
SmallBitVector& llvm::SmallBitVector::operator^= | ( | const SmallBitVector & | RHS | ) | [inline] |
Definition at line 476 of file SmallBitVector.h.
SmallBitVector& llvm::SmallBitVector::operator|= | ( | const SmallBitVector & | RHS | ) | [inline] |
Definition at line 462 of file SmallBitVector.h.
SmallBitVector llvm::SmallBitVector::operator~ | ( | ) | const [inline] |
Definition at line 365 of file SmallBitVector.h.
References SmallBitVector().
void llvm::SmallBitVector::reserve | ( | unsigned | N | ) | [inline] |
Definition at line 268 of file SmallBitVector.h.
References llvm::BitVector::reserve(), and llvm::BitVector::set().
SmallBitVector& llvm::SmallBitVector::reset | ( | ) | [inline] |
Definition at line 317 of file SmallBitVector.h.
References llvm::BitVector::reset().
Referenced by llvm::DependenceAnalysis::depends(), llvm::DependenceAnalysis::getSplitIteration(), llvm::SmallBitVector::reference::operator=(), and reset().
SmallBitVector& llvm::SmallBitVector::reset | ( | unsigned | Idx | ) | [inline] |
Definition at line 325 of file SmallBitVector.h.
References llvm::BitVector::reset().
SmallBitVector& llvm::SmallBitVector::reset | ( | unsigned | I, |
unsigned | E | ||
) | [inline] |
reset - Efficiently reset a range of bits in [I, E)
Definition at line 334 of file SmallBitVector.h.
References I, llvm::BitVector::reset(), and size().
SmallBitVector& llvm::SmallBitVector::reset | ( | const SmallBitVector & | RHS | ) | [inline] |
reset - Reset bits that are set in RHS. Same as *this &= ~RHS.
Definition at line 429 of file SmallBitVector.h.
References llvm::BitVector::reset(), reset(), size(), and test().
void llvm::SmallBitVector::resize | ( | unsigned | N, |
bool | t = false |
||
) | [inline] |
resize - Grow or shrink the bitvector.
Definition at line 252 of file SmallBitVector.h.
References llvm::BitVector::resize().
Referenced by operator&=(), operator^=(), and operator|=().
SmallBitVector& llvm::SmallBitVector::set | ( | ) | [inline] |
Definition at line 286 of file SmallBitVector.h.
References llvm::BitVector::set().
Referenced by llvm::DependenceAnalysis::depends(), llvm::AsmPrinter::EmitDwarfRegOpPiece(), llvm::DependenceAnalysis::getSplitIteration(), and llvm::SmallBitVector::reference::operator=().
SmallBitVector& llvm::SmallBitVector::set | ( | unsigned | Idx | ) | [inline] |
Definition at line 294 of file SmallBitVector.h.
References llvm::BitVector::set().
SmallBitVector& llvm::SmallBitVector::set | ( | unsigned | I, |
unsigned | E | ||
) | [inline] |
set - Efficiently set a range of bits in [I, E)
Definition at line 303 of file SmallBitVector.h.
References I, llvm::BitVector::set(), and size().
void llvm::SmallBitVector::setBitsInMask | ( | const uint32_t * | Mask, |
unsigned | MaskWords = ~0u |
||
) | [inline] |
setBitsInMask - Add '1' bits from Mask to this vector. Don't resize. This computes "*this |= Mask".
Definition at line 522 of file SmallBitVector.h.
References llvm::BitVector::setBitsInMask().
void llvm::SmallBitVector::setBitsNotInMask | ( | const uint32_t * | Mask, |
unsigned | MaskWords = ~0u |
||
) | [inline] |
setBitsNotInMask - Add a bit to this vector for every '0' bit in Mask. Don't resize. This computes "*this |= ~Mask".
Definition at line 540 of file SmallBitVector.h.
References llvm::BitVector::setBitsNotInMask().
size_t llvm::SmallBitVector::size | ( | ) | const [inline] |
size - Returns the number of bits in this bitvector.
Definition at line 172 of file SmallBitVector.h.
References llvm::BitVector::size().
Referenced by anyCommon(), operator&=(), operator==(), operator[](), operator^=(), operator|=(), reset(), set(), and test().
void llvm::SmallBitVector::swap | ( | SmallBitVector & | RHS | ) | [inline] |
Definition at line 516 of file SmallBitVector.h.
Referenced by operator=(), and std::swap().
bool llvm::SmallBitVector::test | ( | unsigned | Idx | ) | const [inline] |
Definition at line 382 of file SmallBitVector.h.
Referenced by anyCommon(), reset(), and test().
bool llvm::SmallBitVector::test | ( | const SmallBitVector & | RHS | ) | const [inline] |
test - Check if (This - RHS) is zero. This is the same as reset(RHS) and any().
Definition at line 444 of file SmallBitVector.h.
References size(), llvm::BitVector::test(), and test().