class BitVector
Declaration
class BitVector { /* full declaration omitted */ };
Declared at: llvm/include/llvm/ADT/BitVector.h:73
Method Overview
- public BitVector()
- public BitVector(unsigned int s, bool t = false)
- public BitVector(const llvm::BitVector & RHS)
- public BitVector(llvm::BitVector && RHS)
- public bool all() const
- public MutableArrayRef<llvm::BitVector::BitWord> allocate(size_t NumWords)
- public bool any() const
- public bool anyCommon(const llvm::BitVector & RHS) const
- public void clear()
- public void clearBitsInMask(const uint32_t * Mask, unsigned int MaskWords = ~0U)
- public void clearBitsNotInMask(const uint32_t * Mask, unsigned int MaskWords = ~0U)
- public llvm::BitVector::size_type count() const
- public bool empty() const
- public int find_first() const
- public int find_first_in(unsigned int Begin, unsigned int End) const
- public int find_first_unset() const
- public int find_first_unset_in(unsigned int Begin, unsigned int End) const
- public int find_last() const
- public int find_last_in(unsigned int Begin, unsigned int End) const
- public int find_last_unset() const
- public int find_last_unset_in(unsigned int Begin, unsigned int End) const
- public int find_next(unsigned int Prev) const
- public int find_next_unset(unsigned int Prev) const
- public int find_prev(unsigned int PriorTo) const
- public int find_prev_unset(unsigned int PriorTo)
- public llvm::BitVector & flip(unsigned int Idx)
- public llvm::BitVector & flip()
- public size_t getBitCapacity() const
- public size_t getMemorySize() const
- public bool none() const
- public void push_back(bool Val)
- public void reserve(unsigned int N)
- public llvm::BitVector & reset()
- public llvm::BitVector & reset(unsigned int Idx)
- public llvm::BitVector & reset(unsigned int I, unsigned int E)
- public llvm::BitVector & reset(const llvm::BitVector & RHS)
- public void resize(unsigned int N, bool t = false)
- public llvm::BitVector & set()
- public llvm::BitVector & set(unsigned int Idx)
- public llvm::BitVector & set(unsigned int I, unsigned int E)
- public void setBitsInMask(const uint32_t * Mask, unsigned int MaskWords = ~0U)
- public void setBitsNotInMask(const uint32_t * Mask, unsigned int MaskWords = ~0U)
- public iterator_range<llvm::BitVector::const_set_bits_iterator> set_bits() const
- public llvm::BitVector::const_set_bits_iterator set_bits_begin() const
- public llvm::BitVector::const_set_bits_iterator set_bits_end() const
- public llvm::BitVector::size_type size() const
- public void swap(llvm::BitVector & RHS)
- public bool test(const llvm::BitVector & RHS) const
- public bool test(unsigned int Idx) const
- public ~BitVector()
Methods
¶BitVector()
BitVector()
Description
BitVector default ctor - Creates an empty bitvector.
Declared at: llvm/include/llvm/ADT/BitVector.h:134
¶BitVector(unsigned int s, bool t = false)
BitVector(unsigned int s, bool t = false)
Description
BitVector ctor - Creates a bitvector of specified number of bits. All bits are initialized to the specified value.
Declared at: llvm/include/llvm/ADT/BitVector.h:138
Parameters
- unsigned int s
- bool t = false
¶BitVector(const llvm::BitVector& RHS)
BitVector(const llvm::BitVector& RHS)
Description
BitVector copy ctor.
Declared at: llvm/include/llvm/ADT/BitVector.h:147
Parameters
- const llvm::BitVector& RHS
¶BitVector(llvm::BitVector&& RHS)
BitVector(llvm::BitVector&& RHS)
Declared at: llvm/include/llvm/ADT/BitVector.h:158
Parameters
- llvm::BitVector&& RHS
¶bool all() const
bool all() const
Description
all - Returns true if all bits are set.
Declared at: llvm/include/llvm/ADT/BitVector.h:188
¶MutableArrayRef<llvm::BitVector::BitWord>
allocate(size_t NumWords)
MutableArrayRef<llvm::BitVector::BitWord>
allocate(size_t NumWords)
Declared at: llvm/include/llvm/ADT/BitVector.h:846
Parameters
- size_t NumWords
¶bool any() const
bool any() const
Description
any - Returns true if any bit is set.
Declared at: llvm/include/llvm/ADT/BitVector.h:180
¶bool anyCommon(const llvm::BitVector& RHS) const
bool anyCommon(const llvm::BitVector& RHS) const
Description
Test if any common bits are set.
Declared at: llvm/include/llvm/ADT/BitVector.h:523
Parameters
- const llvm::BitVector& RHS
¶void clear()
void clear()
Description
clear - Removes all bits from the bitvector. Does not change capacity.
Declared at: llvm/include/llvm/ADT/BitVector.h:366
¶void clearBitsInMask(const uint32_t* Mask,
unsigned int MaskWords = ~0U)
void clearBitsInMask(const uint32_t* Mask,
unsigned int MaskWords = ~0U)
Description
clearBitsInMask - Clear any bits in this vector that are set in Mask. Don't resize. This computes "*this &= ~Mask".
Declared at: llvm/include/llvm/ADT/BitVector.h:781
Parameters
- const uint32_t* Mask
- unsigned int MaskWords = ~0U
¶void clearBitsNotInMask(
const uint32_t* Mask,
unsigned int MaskWords = ~0U)
void clearBitsNotInMask(
const uint32_t* Mask,
unsigned int MaskWords = ~0U)
Description
clearBitsNotInMask - Clear a bit in this vector for every '0' bit in Mask. Don't resize. This computes "*this &= Mask".
Declared at: llvm/include/llvm/ADT/BitVector.h:793
Parameters
- const uint32_t* Mask
- unsigned int MaskWords = ~0U
¶llvm::BitVector::size_type count() const
llvm::BitVector::size_type count() const
Description
count - Returns the number of bits which are set.
Declared at: llvm/include/llvm/ADT/BitVector.h:172
¶bool empty() const
bool empty() const
Description
empty - Tests whether there are no bits in this bitvector.
Declared at: llvm/include/llvm/ADT/BitVector.h:166
¶int find_first() const
int find_first() const
Description
find_first - Returns the index of the first set bit, -1 if none of the bits are set.
Declared at: llvm/include/llvm/ADT/BitVector.h:331
¶int find_first_in(unsigned int Begin,
unsigned int End) const
int find_first_in(unsigned int Begin,
unsigned int End) const
Description
find_first_in - Returns the index of the first set bit in the range [Begin, End). Returns -1 if all bits in the range are unset.
Declared at: llvm/include/llvm/ADT/BitVector.h:207
Parameters
- unsigned int Begin
- unsigned int End
¶int find_first_unset() const
int find_first_unset() const
Description
find_first_unset - Returns the index of the first unset bit, -1 if all of the bits are set.
Declared at: llvm/include/llvm/ADT/BitVector.h:347
¶int find_first_unset_in(unsigned int Begin,
unsigned int End) const
int find_first_unset_in(unsigned int Begin,
unsigned int End) const
Description
find_first_unset_in - Returns the index of the first unset bit in the range [Begin, End). Returns -1 if all bits in the range are set.
Declared at: llvm/include/llvm/ADT/BitVector.h:267
Parameters
- unsigned int Begin
- unsigned int End
¶int find_last() const
int find_last() const
Description
find_last - Returns the index of the last set bit, -1 if none of the bits are set.
Declared at: llvm/include/llvm/ADT/BitVector.h:335
¶int find_last_in(unsigned int Begin,
unsigned int End) const
int find_last_in(unsigned int Begin,
unsigned int End) const
Description
find_last_in - Returns the index of the last set bit in the range [Begin, End). Returns -1 if all bits in the range are unset.
Declared at: llvm/include/llvm/ADT/BitVector.h:236
Parameters
- unsigned int Begin
- unsigned int End
¶int find_last_unset() const
int find_last_unset() const
Description
find_last_unset - Returns the index of the last unset bit, -1 if all of the bits are set.
Declared at: llvm/include/llvm/ADT/BitVector.h:357
¶int find_last_unset_in(unsigned int Begin,
unsigned int End) const
int find_last_unset_in(unsigned int Begin,
unsigned int End) const
Description
find_last_unset_in - Returns the index of the last unset bit in the range [Begin, End). Returns -1 if all bits in the range are set.
Declared at: llvm/include/llvm/ADT/BitVector.h:298
Parameters
- unsigned int Begin
- unsigned int End
¶int find_next(unsigned int Prev) const
int find_next(unsigned int Prev) const
Description
find_next - Returns the index of the next set bit following the "Prev" bit. Returns -1 if the next set bit is not found.
Declared at: llvm/include/llvm/ADT/BitVector.h:339
Parameters
- unsigned int Prev
¶int find_next_unset(unsigned int Prev) const
int find_next_unset(unsigned int Prev) const
Description
find_next_unset - Returns the index of the next unset bit following the "Prev" bit. Returns -1 if all remaining bits are set.
Declared at: llvm/include/llvm/ADT/BitVector.h:351
Parameters
- unsigned int Prev
¶int find_prev(unsigned int PriorTo) const
int find_prev(unsigned int PriorTo) const
Description
find_prev - Returns the index of the first set bit that precedes the the bit at \p PriorTo. Returns -1 if all previous bits are unset.
Declared at: llvm/include/llvm/ADT/BitVector.h:343
Parameters
- unsigned int PriorTo
¶int find_prev_unset(unsigned int PriorTo)
int find_prev_unset(unsigned int PriorTo)
Description
find_prev_unset - Returns the index of the first unset bit that precedes the bit at \p PriorTo. Returns -1 if all previous bits are set.
Declared at: llvm/include/llvm/ADT/BitVector.h:361
Parameters
- unsigned int PriorTo
¶llvm::BitVector& flip(unsigned int Idx)
llvm::BitVector& flip(unsigned int Idx)
Declared at: llvm/include/llvm/ADT/BitVector.h:484
Parameters
- unsigned int Idx
¶llvm::BitVector& flip()
llvm::BitVector& flip()
Declared at: llvm/include/llvm/ADT/BitVector.h:477
¶size_t getBitCapacity() const
size_t getBitCapacity() const
Declared at: llvm/include/llvm/ADT/BitVector.h:928
¶size_t getMemorySize() const
size_t getMemorySize() const
Description
Return the size (in bytes) of the bit vector.
Declared at: llvm/include/llvm/ADT/BitVector.h:927
¶bool none() const
bool none() const
Description
none - Returns true if none of the bits are set.
Declared at: llvm/include/llvm/ADT/BitVector.h:201
¶void push_back(bool Val)
void push_back(bool Val)
Declared at: llvm/include/llvm/ADT/BitVector.h:506
Parameters
- bool Val
¶void reserve(unsigned int N)
void reserve(unsigned int N)
Declared at: llvm/include/llvm/ADT/BitVector.h:391
Parameters
- unsigned int N
¶llvm::BitVector& reset()
llvm::BitVector& reset()
Declared at: llvm/include/llvm/ADT/BitVector.h:438
¶llvm::BitVector& reset(unsigned int Idx)
llvm::BitVector& reset(unsigned int Idx)
Declared at: llvm/include/llvm/ADT/BitVector.h:443
Parameters
- unsigned int Idx
¶llvm::BitVector& reset(unsigned int I,
unsigned int E)
llvm::BitVector& reset(unsigned int I,
unsigned int E)
Description
reset - Efficiently reset a range of bits in [I, E)
Declared at: llvm/include/llvm/ADT/BitVector.h:449
Parameters
- unsigned int I
- unsigned int E
¶llvm::BitVector& reset(const llvm::BitVector& RHS)
llvm::BitVector& reset(const llvm::BitVector& RHS)
Description
reset - Reset bits that are set in RHS. Same as *this & = ~RHS.
Declared at: llvm/include/llvm/ADT/BitVector.h:576
Parameters
- const llvm::BitVector& RHS
¶void resize(unsigned int N, bool t = false)
void resize(unsigned int N, bool t = false)
Description
resize - Grow or shrink the bitvector.
Declared at: llvm/include/llvm/ADT/BitVector.h:371
Parameters
- unsigned int N
- bool t = false
¶llvm::BitVector& set()
llvm::BitVector& set()
Declared at: llvm/include/llvm/ADT/BitVector.h:397
¶llvm::BitVector& set(unsigned int Idx)
llvm::BitVector& set(unsigned int Idx)
Declared at: llvm/include/llvm/ADT/BitVector.h:403
Parameters
- unsigned int Idx
¶llvm::BitVector& set(unsigned int I,
unsigned int E)
llvm::BitVector& set(unsigned int I,
unsigned int E)
Description
set - Efficiently set a range of bits in [I, E)
Declared at: llvm/include/llvm/ADT/BitVector.h:410
Parameters
- unsigned int I
- unsigned int E
¶void setBitsInMask(const uint32_t* Mask,
unsigned int MaskWords = ~0U)
void setBitsInMask(const uint32_t* Mask,
unsigned int MaskWords = ~0U)
Description
setBitsInMask - Add '1' bits from Mask to this vector. Don't resize. This computes "*this |= Mask".
Declared at: llvm/include/llvm/ADT/BitVector.h:775
Parameters
- const uint32_t* Mask
- unsigned int MaskWords = ~0U
¶void setBitsNotInMask(
const uint32_t* Mask,
unsigned int MaskWords = ~0U)
void setBitsNotInMask(
const uint32_t* Mask,
unsigned int MaskWords = ~0U)
Description
setBitsNotInMask - Add a bit to this vector for every '0' bit in Mask. Don't resize. This computes "*this |= ~Mask".
Declared at: llvm/include/llvm/ADT/BitVector.h:787
Parameters
- const uint32_t* Mask
- unsigned int MaskWords = ~0U
¶iterator_range<
llvm::BitVector::const_set_bits_iterator>
set_bits() const
iterator_range<
llvm::BitVector::const_set_bits_iterator>
set_bits() const
Declared at: llvm/include/llvm/ADT/BitVector.h:129
¶llvm::BitVector::const_set_bits_iterator
set_bits_begin() const
llvm::BitVector::const_set_bits_iterator
set_bits_begin() const
Declared at: llvm/include/llvm/ADT/BitVector.h:123
¶llvm::BitVector::const_set_bits_iterator
set_bits_end() const
llvm::BitVector::const_set_bits_iterator
set_bits_end() const
Declared at: llvm/include/llvm/ADT/BitVector.h:126
¶llvm::BitVector::size_type size() const
llvm::BitVector::size_type size() const
Description
size - Returns the number of bits in this bitvector.
Declared at: llvm/include/llvm/ADT/BitVector.h:169
¶void swap(llvm::BitVector& RHS)
void swap(llvm::BitVector& RHS)
Declared at: llvm/include/llvm/ADT/BitVector.h:756
Parameters
- llvm::BitVector& RHS
¶bool test(const llvm::BitVector& RHS) const
bool test(const llvm::BitVector& RHS) const
Description
test - Check if (This - RHS) is zero. This is the same as reset(RHS) and any().
Declared at: llvm/include/llvm/ADT/BitVector.h:587
Parameters
- const llvm::BitVector& RHS
¶bool test(unsigned int Idx) const
bool test(unsigned int Idx) const
Declared at: llvm/include/llvm/ADT/BitVector.h:501
Parameters
- unsigned int Idx
¶~BitVector()
~BitVector()
Declared at: llvm/include/llvm/ADT/BitVector.h:163