LLVM  3.7.0
Classes | Public Types | Public Member Functions | List of all members
llvm::BitVector Class Reference

#include <BitVector.h>

Classes

class  reference
 

Public Types

typedef unsigned size_type
 

Public Member Functions

 BitVector ()
 BitVector default ctor - Creates an empty bitvector. More...
 
 BitVector (unsigned s, bool t=false)
 BitVector ctor - Creates a bitvector of specified number of bits. More...
 
 BitVector (const BitVector &RHS)
 BitVector copy ctor. More...
 
 BitVector (BitVector &&RHS)
 
 ~BitVector ()
 
bool empty () const
 empty - Tests whether there are no bits in this bitvector. More...
 
size_type 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)
 
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
 test - Check if (This - RHS) is zero. More...
 
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)
 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...
 

Detailed Description

Definition at line 27 of file BitVector.h.

Member Typedef Documentation

Definition at line 40 of file BitVector.h.

Constructor & Destructor Documentation

llvm::BitVector::BitVector ( )
inline

BitVector default ctor - Creates an empty bitvector.

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

References llvm::tgtok::Bits.

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

BitVector copy ctor.

Definition at line 93 of file BitVector.h.

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

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

Definition at line 105 of file BitVector.h.

llvm::BitVector::~BitVector ( )
inline

Definition at line 110 of file BitVector.h.

References llvm::tgtok::Bits.

Member Function Documentation

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

all - Returns true if all bits are set.

Definition at line 137 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 129 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 327 of file BitVector.h.

References llvm::tgtok::Bits, fuzzer::min(), 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 487 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 499 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 121 of file BitVector.h.

References llvm::tgtok::Bits, llvm::countPopulation(), 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 115 of file BitVector.h.

Referenced by 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
BitVector& llvm::BitVector::flip ( )
inline
BitVector& llvm::BitVector::flip ( unsigned  Idx)
inline

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

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

Intersection, union, disjoint union.

Definition at line 363 of file BitVector.h.

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

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

Definition at line 423 of file BitVector.h.

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

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

Definition at line 448 of file BitVector.h.

References llvm::tgtok::Bits.

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

Definition at line 337 of file BitVector.h.

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

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

Definition at line 311 of file BitVector.h.

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

Definition at line 316 of file BitVector.h.

References llvm::tgtok::Bits.

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

Definition at line 414 of file BitVector.h.

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

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

Definition at line 406 of file BitVector.h.

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

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

Definition at line 212 of file BitVector.h.

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

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

Definition at line 264 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 270 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 380 of file BitVector.h.

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

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

Definition at line 218 of file BitVector.h.

References llvm::tgtok::Bits.

Referenced by checkNumAlignedDPRCS2Regs(), collectChangingRegs(), llvm::SystemZFrameLowering::determineCalleeSaves(), llvm::Mips16FrameLowering::determineCalleeSaves(), llvm::HexagonFrameLowering::determineCalleeSaves(), llvm::ARMFrameLowering::determineCalleeSaves(), llvm::AArch64FrameLowering::determineCalleeSaves(), llvm::X86FrameLowering::determineCalleeSaves(), llvm::TargetFrameLowering::determineCalleeSaves(), llvm::ScheduleDAGInstrs::fixupKills(), getAllocatableSetForRC(), llvm::MachineFrameInfo::getPristineRegs(), llvm::RegScavenger::getRegsAvailable(), llvm::R600RegisterInfo::getReservedRegs(), llvm::SIRegisterInfo::getReservedRegs(), llvm::BPFRegisterInfo::getReservedRegs(), llvm::MSP430RegisterInfo::getReservedRegs(), llvm::SparcRegisterInfo::getReservedRegs(), llvm::XCoreRegisterInfo::getReservedRegs(), llvm::WebAssemblyRegisterInfo::getReservedRegs(), llvm::SystemZRegisterInfo::getReservedRegs(), llvm::MipsRegisterInfo::getReservedRegs(), llvm::HexagonRegisterInfo::getReservedRegs(), llvm::AArch64RegisterInfo::getReservedRegs(), llvm::PPCRegisterInfo::getReservedRegs(), llvm::X86RegisterInfo::getReservedRegs(), llvm::ARMBaseRegisterInfo::getReservedRegs(), llvm::RegScavenger::initRegState(), llvm::optimizeGlobalCtorsList(), llvm::SmallBitVector::reserve(), llvm::R600InstrInfo::reserveIndirectRegisters(), llvm::SIInstrInfo::reserveIndirectRegisters(), llvm::ScheduleDAGMILive::schedule(), llvm::SmallBitVector::set(), setAliasRegs(), llvm::LiveRangeCalc::setLiveOutValue(), llvm::MachineRegisterInfo::setPhysRegUsed(), llvm::MachineRegisterInfo::setRegUnitUsed(), llvm::ScheduleDAGInstrs::startBlockForKills(), and trackRegDefsUses().

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

Definition at line 224 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 231 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 481 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 493 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 461 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 391 of file BitVector.h.

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


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