LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | List of all members
llvm::BitVector Class Reference

#include <BitVector.h>

Classes

class  reference
 

Public Member Functions

 BitVector ()
 BitVector default ctor - Creates an empty bitvector. More...
 
 BitVector (unsigned s, bool t=false)
 
 BitVector (const BitVector &RHS)
 BitVector copy ctor. More...
 
 ~BitVector ()
 
bool empty () const
 empty - Tests whether there are no bits in this bitvector. More...
 
unsigned size () const
 size - Returns the number of bits in this bitvector. More...
 
unsigned 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
 
int find_next (unsigned Prev) const
 
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)
 
BitVectorset ()
 
BitVectorset (unsigned Idx)
 
BitVectorset (unsigned I, unsigned E)
 set - Efficiently set a range of bits in [I, E) More...
 
BitVectorreset ()
 
BitVectorreset (unsigned Idx)
 
BitVectorreset (unsigned I, unsigned E)
 reset - Efficiently reset a range of bits in [I, E) More...
 
BitVectorflip ()
 
BitVectorflip (unsigned Idx)
 
reference operator[] (unsigned Idx)
 
bool operator[] (unsigned Idx) const
 
bool test (unsigned Idx) const
 
bool anyCommon (const BitVector &RHS) const
 Test if any common bits are set. More...
 
bool operator== (const BitVector &RHS) const
 
bool operator!= (const BitVector &RHS) const
 
BitVectoroperator&= (const BitVector &RHS)
 Intersection, union, disjoint union. More...
 
BitVectorreset (const BitVector &RHS)
 reset - Reset bits that are set in RHS. Same as *this &= ~RHS. More...
 
bool test (const BitVector &RHS) const
 
BitVectoroperator|= (const BitVector &RHS)
 
BitVectoroperator^= (const BitVector &RHS)
 
const BitVectoroperator= (const BitVector &RHS)
 
void swap (BitVector &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)
 

Detailed Description

Definition at line 27 of file BitVector.h.

Constructor & Destructor Documentation

llvm::BitVector::BitVector ( )
inline

BitVector default ctor - Creates an empty bitvector.

Definition at line 74 of file BitVector.h.

References llvm::tgtok::Bits.

llvm::BitVector::BitVector ( unsigned  s,
bool  t = false 
)
inlineexplicit

BitVector ctor - Creates a bitvector of specified number of bits. All bits are initialized to the specified value.

Definition at line 80 of file BitVector.h.

References llvm::tgtok::Bits, and llvm::LibFunc::malloc.

llvm::BitVector::BitVector ( const BitVector RHS)
inline

BitVector copy ctor.

Definition at line 89 of file BitVector.h.

References llvm::tgtok::Bits, llvm::LibFunc::malloc, llvm::Intrinsic::memcpy, and size().

llvm::BitVector::~BitVector ( )
inline

Definition at line 108 of file BitVector.h.

References llvm::tgtok::Bits, and llvm::LibFunc::free.

Member Function Documentation

bool llvm::BitVector::all ( ) const
inline

all - Returns true if all bits are set.

Definition at line 140 of file BitVector.h.

References llvm::tgtok::Bits.

Referenced by llvm::SmallBitVector::all().

bool llvm::BitVector::any ( ) const
inline

any - Returns true if any bit is set.

Definition at line 132 of file BitVector.h.

References llvm::tgtok::Bits, and size().

Referenced by llvm::SmallBitVector::any(), llvm::AggressiveAntiDepBreaker::BreakAntiDependencies(), none(), and llvm::RegScavenger::scavengeRegister().

bool llvm::BitVector::anyCommon ( const BitVector RHS) const
inline

Test if any common bits are set.

Definition at line 342 of file BitVector.h.

References llvm::tgtok::Bits, and size().

Referenced by llvm::SmallBitVector::anyCommon().

void llvm::BitVector::clear ( )
inline
void llvm::BitVector::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 503 of file BitVector.h.

Referenced by llvm::SmallBitVector::clearBitsInMask().

void llvm::BitVector::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 515 of file BitVector.h.

Referenced by llvm::LiveIntervals::checkRegMaskInterference(), and llvm::SmallBitVector::clearBitsNotInMask().

unsigned llvm::BitVector::count ( ) const
inline

count - Returns the number of bits which are set.

Definition at line 119 of file BitVector.h.

References llvm::tgtok::Bits, llvm::CountPopulation_32(), llvm::CountPopulation_64(), llvm_unreachable, and size().

Referenced by llvm::SmallBitVector::count().

bool llvm::BitVector::empty ( ) const
inline

empty - Tests whether there are no bits in this bitvector.

Definition at line 113 of file BitVector.h.

Referenced by llvm::PBQPBuilder::build(), llvm::LiveRegMatrix::checkRegMaskInterference(), llvm::SmallBitVector::empty(), and llvm::MachineRegisterInfo::reservedRegsFrozen().

int llvm::BitVector::find_first ( ) const
inline
int llvm::BitVector::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 173 of file BitVector.h.

References llvm::tgtok::Bits, llvm::countTrailingZeros(), llvm_unreachable, and size().

Referenced by llvm::AggressiveAntiDepBreaker::AggressiveAntiDepBreaker(), llvm::SmallBitVector::find_next(), llvm::SpillPlacement::finish(), llvm::RegScavenger::initRegState(), and llvm::SpillPlacement::scanActiveBundles().

BitVector& llvm::BitVector::flip ( )
inline
BitVector& llvm::BitVector::flip ( unsigned  Idx)
inline

Definition at line 320 of file BitVector.h.

References llvm::tgtok::Bits.

bool llvm::BitVector::none ( ) const
inline

none - Returns true if none of the bits are set.

Definition at line 153 of file BitVector.h.

References any().

Referenced by llvm::AggressiveAntiDepBreaker::AggressiveAntiDepBreaker(), and llvm::SmallBitVector::none().

bool llvm::BitVector::operator!= ( const BitVector RHS) const
inline

Definition at line 373 of file BitVector.h.

BitVector& llvm::BitVector::operator&= ( const BitVector RHS)
inline

Intersection, union, disjoint union.

Definition at line 378 of file BitVector.h.

References llvm::tgtok::Bits, for(), and size().

const BitVector& llvm::BitVector::operator= ( const BitVector RHS)
inline
bool llvm::BitVector::operator== ( const BitVector RHS) const
inline

Definition at line 352 of file BitVector.h.

References llvm::tgtok::Bits, and size().

reference llvm::BitVector::operator[] ( unsigned  Idx)
inline

Definition at line 326 of file BitVector.h.

bool llvm::BitVector::operator[] ( unsigned  Idx) const
inline

Definition at line 331 of file BitVector.h.

References llvm::tgtok::Bits.

BitVector& llvm::BitVector::operator^= ( const BitVector RHS)
inline

Definition at line 429 of file BitVector.h.

References llvm::tgtok::Bits, resize(), and size().

BitVector& llvm::BitVector::operator|= ( const BitVector RHS)
inline

Definition at line 421 of file BitVector.h.

References llvm::tgtok::Bits, resize(), and size().

void llvm::BitVector::reserve ( unsigned  N)
inline

Definition at line 230 of file BitVector.h.

Referenced by llvm::SmallBitVector::reserve().

BitVector& llvm::BitVector::reset ( )
inline
BitVector& llvm::BitVector::reset ( unsigned  Idx)
inline

Definition at line 280 of file BitVector.h.

References llvm::tgtok::Bits.

BitVector& llvm::BitVector::reset ( unsigned  I,
unsigned  E 
)
inline

reset - Efficiently reset a range of bits in [I, E)

Definition at line 286 of file BitVector.h.

References llvm::tgtok::Bits, llvm::RoundUpToAlignment(), and size().

BitVector& llvm::BitVector::reset ( const BitVector RHS)
inline

reset - Reset bits that are set in RHS. Same as *this &= ~RHS.

Definition at line 395 of file BitVector.h.

References llvm::tgtok::Bits, and size().

void llvm::BitVector::resize ( unsigned  N,
bool  t = false 
)
inline
BitVector& llvm::BitVector::set ( )
inline
BitVector& llvm::BitVector::set ( unsigned  Idx)
inline

Definition at line 242 of file BitVector.h.

References llvm::tgtok::Bits.

BitVector& llvm::BitVector::set ( unsigned  I,
unsigned  E 
)
inline

set - Efficiently set a range of bits in [I, E)

Definition at line 248 of file BitVector.h.

References llvm::tgtok::Bits, llvm::RoundUpToAlignment(), and size().

void llvm::BitVector::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 497 of file BitVector.h.

Referenced by llvm::TargetLoweringBase::findRepresentativeClass(), and llvm::SmallBitVector::setBitsInMask().

void llvm::BitVector::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 509 of file BitVector.h.

Referenced by llvm::MachineRegisterInfo::addPhysRegsUsedFromRegMask(), and llvm::SmallBitVector::setBitsNotInMask().

unsigned llvm::BitVector::size ( ) const
inline
void llvm::BitVector::swap ( BitVector RHS)
inline

Definition at line 477 of file BitVector.h.

References llvm::tgtok::Bits, and std::swap().

Referenced by std::swap().

bool llvm::BitVector::test ( unsigned  Idx) const
inline
bool llvm::BitVector::test ( const BitVector RHS) const
inline

test - Check if (This - RHS) is zero. This is the same as reset(RHS) and any().

Definition at line 406 of file BitVector.h.

References llvm::tgtok::Bits, and size().


The documentation for this class was generated from the following file: