LLVM API Documentation

llvm::BitVector Class Reference

#include <BitVector.h>

Collaboration diagram for llvm::BitVector:
[legend]

List of all members.

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 ()
unsigned size () const
 size - Returns the number of bits in this bitvector.
unsigned count () const
 count - Returns the number of bits which are set.
bool any () const
 any - Returns true if any bit is 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 & reset ()
BitVector & reset (unsigned Idx)
BitVector & flip ()
BitVector & flip (unsigned Idx)
BitVector operator~ () const
reference operator[] (unsigned Idx)
bool operator[] (unsigned Idx) const
bool test (unsigned Idx) const
bool operator== (const BitVector &RHS) const
bool operator!= (const BitVector &RHS) const
BitVector & operator &= (const BitVector &RHS)
BitVector & operator|= (const BitVector &RHS)
BitVector & operator^= (const BitVector &RHS)
const BitVector & operator= (const BitVector &RHS)

Classes

class  reference


Detailed Description

Definition at line 24 of file BitVector.h.


Constructor & Destructor Documentation

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

BitVector default ctor - Creates an empty bitvector.

Definition at line 66 of file BitVector.h.

Referenced by operator~().

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

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

BitVector copy ctor.

Definition at line 81 of file BitVector.h.

References Bits, and size().

llvm::BitVector::~BitVector (  )  [inline]

Definition at line 93 of file BitVector.h.


Member Function Documentation

unsigned llvm::BitVector::size (  )  const [inline]

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

count - Returns the number of bits which are set.

Definition at line 101 of file BitVector.h.

References llvm::CountPopulation_32(), llvm::CountPopulation_64(), and size().

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

any - Returns true if any bit is set.

Definition at line 114 of file BitVector.h.

References size().

Referenced by none().

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

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

Definition at line 122 of file BitVector.h.

References any().

Referenced by llvm::LiveVariables::HandleVirtRegDef().

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

References llvm::CountTrailingZeros_32(), llvm::CountTrailingZeros_64(), and size().

Referenced by llvm::LiveIntervals::addIntervalsForSpills(), llvm::LiveVariables::VarInfo::dump(), llvm::RegScavenger::FindUnusedReg(), and llvm::RegScavenger::scavengeRegister().

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

References llvm::CountTrailingZeros_32(), llvm::CountTrailingZeros_64(), L, and size().

Referenced by llvm::LiveIntervals::addIntervalsForSpills(), llvm::LiveVariables::VarInfo::dump(), and llvm::RegScavenger::scavengeRegister().

void llvm::BitVector::clear (  )  [inline]

clear - Clear all bits.

Definition at line 177 of file BitVector.h.

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

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

Definition at line 202 of file BitVector.h.

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

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

Definition at line 214 of file BitVector.h.

References Idx, and L.

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

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

Definition at line 224 of file BitVector.h.

References L.

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

Definition at line 229 of file BitVector.h.

References size().

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

Definition at line 236 of file BitVector.h.

References L.

BitVector llvm::BitVector::operator~ (  )  const [inline]

Definition at line 242 of file BitVector.h.

References BitVector().

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

Definition at line 247 of file BitVector.h.

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

Definition at line 252 of file BitVector.h.

References L.

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

Definition at line 258 of file BitVector.h.

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

Definition at line 263 of file BitVector.h.

References Bits, and size().

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

Definition at line 284 of file BitVector.h.

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

Definition at line 289 of file BitVector.h.

References Bits, and size().

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

Definition at line 305 of file BitVector.h.

References Bits, size(), and Size.

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

Definition at line 312 of file BitVector.h.

References Bits, size(), and Size.

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

Definition at line 320 of file BitVector.h.

References Bits, and size().


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