LLVM API Documentation

Classes | Public Types | Public Member Functions
llvm::BitVector Class Reference

#include <BitVector.h>

List of all members.

Classes

class  reference

Public Types

typedef unsigned size_type

Public Member Functions

 BitVector ()
 BitVector default ctor - Creates an empty bitvector.
 BitVector (unsigned s, bool t=false)
 BitVector (const BitVector &RHS)
 BitVector copy ctor.
 BitVector (BitVector &&RHS)
 ~BitVector ()
bool empty () const
 empty - Tests whether there are no bits in this bitvector.
size_type 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)
BitVectorset ()
BitVectorset (unsigned Idx)
BitVectorset (unsigned I, unsigned E)
 set - Efficiently set a range of bits in [I, E)
BitVectorreset ()
BitVectorreset (unsigned Idx)
BitVectorreset (unsigned I, unsigned E)
 reset - Efficiently reset a range of bits in [I, E)
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.
bool operator== (const BitVector &RHS) const
bool operator!= (const BitVector &RHS) const
BitVectoroperator&= (const BitVector &RHS)
 Intersection, union, disjoint union.
BitVectorreset (const BitVector &RHS)
 reset - Reset bits that are set in RHS. Same as *this &= ~RHS.
bool test (const BitVector &RHS) const
BitVectoroperator|= (const BitVector &RHS)
BitVectoroperator^= (const BitVector &RHS)
const BitVectoroperator= (const BitVector &RHS)
const BitVectoroperator= (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.


Member Typedef Documentation

Definition at line 37 of file BitVector.h.


Constructor & Destructor Documentation

BitVector default ctor - Creates an empty bitvector.

Definition at line 75 of file BitVector.h.

References llvm::tgtok::Bits.

llvm::BitVector::BitVector ( unsigned  s,
bool  t = false 
) [inline, explicit]

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

Definition at line 81 of file BitVector.h.

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

BitVector copy ctor.

Definition at line 90 of file BitVector.h.

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

llvm::BitVector::BitVector ( BitVector &&  RHS) [inline]

Definition at line 102 of file BitVector.h.

Definition at line 107 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 139 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 131 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 343 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 502 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 514 of file BitVector.h.

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

size_type llvm::BitVector::count ( ) const [inline]

count - Returns the number of bits which are set.

Definition at line 118 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 112 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 172 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().

Definition at line 321 of file BitVector.h.

References llvm::tgtok::Bits.

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

Definition at line 374 of file BitVector.h.

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

Intersection, union, disjoint union.

Definition at line 379 of file BitVector.h.

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

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

Definition at line 463 of file BitVector.h.

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

bool llvm::BitVector::operator== ( const BitVector RHS) const [inline]

Definition at line 353 of file BitVector.h.

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

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

Definition at line 327 of file BitVector.h.

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

Definition at line 332 of file BitVector.h.

References llvm::tgtok::Bits.

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

Definition at line 430 of file BitVector.h.

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

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

Definition at line 422 of file BitVector.h.

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

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

Definition at line 229 of file BitVector.h.

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

Definition at line 280 of file BitVector.h.

References llvm::tgtok::Bits.

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().

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

Definition at line 396 of file BitVector.h.

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

void llvm::BitVector::resize ( unsigned  N,
bool  t = false 
) [inline]

Definition at line 241 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 247 of file BitVector.h.

References llvm::tgtok::Bits, I, 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 496 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 508 of file BitVector.h.

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

size_type llvm::BitVector::size ( ) const [inline]
void llvm::BitVector::swap ( BitVector RHS) [inline]

Definition at line 476 of file BitVector.h.

References llvm::tgtok::Bits.

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 407 of file BitVector.h.

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


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