LLVM API Documentation
#include <BitVector.h>
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) |
BitVector & | set () |
BitVector & | set (unsigned Idx) |
BitVector & | set (unsigned I, unsigned E) |
set - Efficiently set a range of bits in [I, E) | |
BitVector & | reset () |
BitVector & | reset (unsigned Idx) |
BitVector & | reset (unsigned I, unsigned E) |
reset - Efficiently reset a range of bits in [I, E) | |
BitVector & | flip () |
BitVector & | flip (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 |
BitVector & | operator&= (const BitVector &RHS) |
Intersection, union, disjoint union. | |
BitVector & | reset (const BitVector &RHS) |
reset - Reset bits that are set in RHS. Same as *this &= ~RHS. | |
bool | test (const BitVector &RHS) const |
BitVector & | operator|= (const BitVector &RHS) |
BitVector & | operator^= (const BitVector &RHS) |
const BitVector & | operator= (const BitVector &RHS) |
const BitVector & | operator= (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) |
Definition at line 27 of file BitVector.h.
typedef unsigned llvm::BitVector::size_type |
Definition at line 37 of file BitVector.h.
llvm::BitVector::BitVector | ( | ) | [inline] |
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.
llvm::BitVector::BitVector | ( | const BitVector & | RHS | ) | [inline] |
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.
llvm::BitVector::~BitVector | ( | ) | [inline] |
Definition at line 107 of file BitVector.h.
References llvm::tgtok::Bits, and llvm::LibFunc::free.
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] |
clear - Clear all bits.
Definition at line 204 of file BitVector.h.
Referenced by llvm::LiveRegMatrix::checkRegMaskInterference(), llvm::LiveIntervals::checkRegMaskInterference(), llvm::SplitAnalysis::clear(), llvm::ScheduleDAGMILive::computeDFSResult(), llvm::BuildVectorSDNode::getSplatValue(), llvm::SpillPlacement::prepare(), and llvm::LiveRangeCalc::reset().
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] |
find_first - Returns the index of the first set bit, -1 if none of the bits are set.
Definition at line 158 of file BitVector.h.
References llvm::tgtok::Bits, llvm::countTrailingZeros(), llvm_unreachable, and size().
Referenced by llvm::AggressiveAntiDepBreaker::AggressiveAntiDepBreaker(), llvm::SmallBitVector::find_first(), llvm::SpillPlacement::finish(), llvm::RegScavenger::initRegState(), llvm::Mips16InstrInfo::loadImmediate(), and llvm::SpillPlacement::scanActiveBundles().
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().
BitVector& llvm::BitVector::flip | ( | ) | [inline] |
Definition at line 314 of file BitVector.h.
References llvm::tgtok::Bits, and size().
Referenced by llvm::SmallBitVector::flip(), and llvm::TargetRegisterInfo::getAllocatableSet().
BitVector& llvm::BitVector::flip | ( | unsigned | Idx | ) | [inline] |
Definition at line 321 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 152 of file BitVector.h.
References any().
Referenced by llvm::AggressiveAntiDepBreaker::AggressiveAntiDepBreaker(), llvm::SelectionDAG::getVectorShuffle(), llvm::TargetLowering::isConstFalseVal(), isConstOrConstSplat(), isConstOrConstSplatFP(), llvm::TargetLowering::isConstTrueVal(), and llvm::SmallBitVector::none().
Definition at line 374 of file BitVector.h.
Intersection, union, disjoint union.
Definition at line 379 of file BitVector.h.
References llvm::tgtok::Bits, and size().
Definition at line 439 of file BitVector.h.
References llvm::tgtok::Bits, llvm::LibFunc::free, llvm::LibFunc::malloc, llvm::LibFunc::memcpy, and size().
Definition at line 463 of file BitVector.h.
References llvm::tgtok::Bits, and llvm::LibFunc::free.
Definition at line 353 of file BitVector.h.
References llvm::tgtok::Bits, and size().
Definition at line 327 of file BitVector.h.
Definition at line 332 of file BitVector.h.
References llvm::tgtok::Bits.
Definition at line 430 of file BitVector.h.
References llvm::tgtok::Bits, resize(), and size().
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().
BitVector& llvm::BitVector::reset | ( | ) | [inline] |
Definition at line 275 of file BitVector.h.
References llvm::tgtok::Bits.
Referenced by llvm::ScheduleDAGTopologicalSort::AddPred(), llvm::SpillPlacement::finish(), llvm::CriticalAntiDepBreaker::FinishBlock(), llvm::ScheduleDAGInstrs::fixupKills(), llvm::ScheduleDAGTopologicalSort::IsReachable(), llvm::Mips16InstrInfo::loadImmediate(), llvm::SmallBitVector::reset(), llvm::RegScavenger::scavengeRegister(), llvm::MachineRegisterInfo::setPhysRegUnused(), llvm::RegScavenger::setRegUsed(), llvm::CriticalAntiDepBreaker::StartBlock(), and llvm::ScheduleDAGInstrs::startBlockForKills().
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 396 of file BitVector.h.
References llvm::tgtok::Bits, and size().
void llvm::BitVector::resize | ( | unsigned | N, |
bool | t = false |
||
) | [inline] |
resize - Grow or shrink the bitvector.
Definition at line 209 of file BitVector.h.
References llvm::tgtok::Bits.
Referenced by llvm::LiveIntervals::checkRegMaskInterference(), llvm::ScheduleDAGMILive::computeDFSResult(), llvm::RegScavenger::enterBasicBlock(), llvm::ScheduleDAGInstrs::fixupKills(), llvm::BuildVectorSDNode::getSplatValue(), llvm::ScheduleDAGTopologicalSort::InitDAGTopologicalSorting(), initReachingDef(), llvm::MachineRegisterInfo::MachineRegisterInfo(), operator^=(), operator|=(), llvm::SpillPlacement::prepare(), llvm::LiveRangeCalc::reset(), and llvm::SmallBitVector::resize().
BitVector& llvm::BitVector::set | ( | ) | [inline] |
Definition at line 235 of file BitVector.h.
References llvm::tgtok::Bits.
Referenced by llvm::ScheduleDAGInstrs::fixupKills(), getAllocatableSetForRC(), llvm::MachineFrameInfo::getPristineRegs(), llvm::RegScavenger::getRegsAvailable(), llvm::SIRegisterInfo::getReservedRegs(), llvm::R600RegisterInfo::getReservedRegs(), llvm::MSP430RegisterInfo::getReservedRegs(), llvm::XCoreRegisterInfo::getReservedRegs(), llvm::SparcRegisterInfo::getReservedRegs(), llvm::SystemZRegisterInfo::getReservedRegs(), llvm::PPCRegisterInfo::getReservedRegs(), llvm::MipsRegisterInfo::getReservedRegs(), llvm::HexagonRegisterInfo::getReservedRegs(), llvm::AArch64RegisterInfo::getReservedRegs(), llvm::ARMBaseRegisterInfo::getReservedRegs(), llvm::RegScavenger::initRegState(), llvm::SmallBitVector::reserve(), llvm::SIInstrInfo::reserveIndirectRegisters(), llvm::R600InstrInfo::reserveIndirectRegisters(), llvm::ScheduleDAGMILive::schedule(), llvm::SmallBitVector::set(), llvm::LiveRangeCalc::setLiveOutValue(), llvm::MachineRegisterInfo::setPhysRegUsed(), llvm::MachineRegisterInfo::setRegUnitUsed(), llvm::ScheduleDAGInstrs::startBlockForKills(), and trackRegDefsUses().
BitVector& llvm::BitVector::set | ( | unsigned | Idx | ) | [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] |
size - Returns the number of bits in this bitvector.
Definition at line 115 of file BitVector.h.
Referenced by any(), anyCommon(), BitVector(), count(), find_first(), find_next(), flip(), llvm::MachineRegisterInfo::freezeReservedRegs(), operator&=(), operator=(), operator==(), operator^=(), operator|=(), reset(), llvm::RegisterClassInfo::runOnMachineFunction(), set(), llvm::SmallBitVector::size(), and test().
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] |
Definition at line 338 of file BitVector.h.
Referenced by addLiveInRegs(), llvm::CriticalAntiDepBreaker::BreakAntiDependencies(), llvm::AggressiveAntiDepBreaker::BreakAntiDependencies(), llvm::PBQPBuilder::build(), llvm::MachineRegisterInfo::canReserveReg(), llvm::LiveRegMatrix::checkRegMaskInterference(), llvm::ScheduleDAGInstrs::fixupKills(), llvm::ARMBaseRegisterInfo::getReservedRegs(), llvm::MachineRegisterInfo::isPhysRegUsed(), llvm::RegScavenger::isRegUsed(), llvm::MachineRegisterInfo::isReserved(), llvm::SplitAnalysis::isThroughBlock(), llvm::ScheduleDAGMILive::schedule(), llvm::CriticalAntiDepBreaker::StartBlock(), llvm::AggressiveAntiDepBreaker::StartBlock(), llvm::SmallBitVector::test(), and llvm::ScheduleDAGInstrs::toggleKillFlag().
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().