LLVM API Documentation

llvm::TargetRegisterClass Class Reference

#include <TargetRegisterInfo.h>

Collaboration diagram for llvm::TargetRegisterClass:
[legend]

List of all members.

Public Types

typedef const unsigned * iterator
typedef const unsigned * const_iterator
typedef const EVT * vt_iterator
typedef const
TargetRegisterClass *const * 
sc_iterator

Public Member Functions

 TargetRegisterClass (unsigned id, const char *name, const EVT *vts, const TargetRegisterClass *const *subcs, const TargetRegisterClass *const *supcs, const TargetRegisterClass *const *subregcs, const TargetRegisterClass *const *superregcs, unsigned RS, unsigned Al, int CC, iterator RB, iterator RE)
virtual ~TargetRegisterClass ()
unsigned getID () const
const char * getName () const
iterator begin () const
iterator end () const
unsigned getNumRegs () const
unsigned getRegister (unsigned i) const
bool contains (unsigned Reg) const
bool hasType (EVT vt) const
vt_iterator vt_begin () const
vt_iterator vt_end () const
sc_iterator subregclasses_begin () const
sc_iterator subregclasses_end () const
const TargetRegisterClass * getSubRegisterRegClass (unsigned SubIdx) const
sc_iterator superregclasses_begin () const
sc_iterator superregclasses_end () const
bool hasSubClass (const TargetRegisterClass *cs) const
sc_iterator subclasses_begin () const
sc_iterator subclasses_end () const
bool hasSuperClass (const TargetRegisterClass *cs) const
sc_iterator superclasses_begin () const
sc_iterator superclasses_end () const
bool isASubClass () const
virtual iterator allocation_order_begin (const MachineFunction &MF) const
virtual iterator allocation_order_end (const MachineFunction &MF) const
unsigned getSize () const
unsigned getAlignment () const
int getCopyCost () const


Detailed Description

Definition at line 51 of file TargetRegisterInfo.h.


Member Typedef Documentation

Definition at line 53 of file TargetRegisterInfo.h.

Definition at line 54 of file TargetRegisterInfo.h.

Definition at line 56 of file TargetRegisterInfo.h.

Definition at line 57 of file TargetRegisterInfo.h.


Constructor & Destructor Documentation

llvm::TargetRegisterClass::TargetRegisterClass ( unsigned  id,
const char *  name,
const EVT *  vts,
const TargetRegisterClass *const *  subcs,
const TargetRegisterClass *const *  supcs,
const TargetRegisterClass *const *  subregcs,
const TargetRegisterClass *const *  superregcs,
unsigned  RS,
unsigned  Al,
int  CC,
iterator  RB,
iterator  RE 
) [inline]

Definition at line 71 of file TargetRegisterInfo.h.

References E, and llvm::DenseSet< ValueT, ValueInfoT >::insert().

virtual llvm::TargetRegisterClass::~TargetRegisterClass (  )  [inline, virtual]

Definition at line 86 of file TargetRegisterInfo.h.


Member Function Documentation

unsigned llvm::TargetRegisterClass::getID (  )  const [inline]

const char* llvm::TargetRegisterClass::getName (  )  const [inline]

getName() - Return the register class name for debugging.

Definition at line 94 of file TargetRegisterInfo.h.

Referenced by llvm::BlackfinInstrInfo::copyRegToReg(), llvm::LiveStacks::print(), and llvm::BlackfinInstrInfo::storeRegToStackSlot().

iterator llvm::TargetRegisterClass::begin (  )  const [inline]

iterator llvm::TargetRegisterClass::end (  )  const [inline]

unsigned llvm::TargetRegisterClass::getNumRegs (  )  const [inline]

getNumRegs - Return the number of registers in this class.

Definition at line 103 of file TargetRegisterInfo.h.

Referenced by llvm::BlackfinRegisterInfo::getPhysicalRegisterRegClass(), and getRegister().

unsigned llvm::TargetRegisterClass::getRegister ( unsigned  i  )  const [inline]

getRegister - Return the specified register in the class.

Definition at line 107 of file TargetRegisterInfo.h.

References getNumRegs().

bool llvm::TargetRegisterClass::contains ( unsigned  Reg  )  const [inline]

bool llvm::TargetRegisterClass::hasType ( EVT  vt  )  const [inline]

vt_iterator llvm::TargetRegisterClass::vt_begin (  )  const [inline]

vt_begin / vt_end - Loop over all of the value types that can be represented by values in this register class.

Definition at line 129 of file TargetRegisterInfo.h.

Referenced by llvm::TargetLowering::getRegForInlineAsmConstraint(), llvm::SelectionDAGLowering::GetRegistersForValue(), isAllocatableRegister(), and llvm::X86InstrInfo::unfoldMemoryOperand().

vt_iterator llvm::TargetRegisterClass::vt_end (  )  const [inline]

sc_iterator llvm::TargetRegisterClass::subregclasses_begin (  )  const [inline]

subregclasses_begin / subregclasses_end - Loop over all of the subreg register classes of this register class.

Definition at line 141 of file TargetRegisterInfo.h.

sc_iterator llvm::TargetRegisterClass::subregclasses_end (  )  const [inline]

Definition at line 145 of file TargetRegisterInfo.h.

const TargetRegisterClass* llvm::TargetRegisterClass::getSubRegisterRegClass ( unsigned  SubIdx  )  const [inline]

getSubRegisterRegClass - Return the register class of subregisters with index SubIdx, or NULL if no such class exists.

Definition at line 153 of file TargetRegisterInfo.h.

sc_iterator llvm::TargetRegisterClass::superregclasses_begin (  )  const [inline]

superregclasses_begin / superregclasses_end - Loop over all of the superreg register classes of this register class.

Definition at line 163 of file TargetRegisterInfo.h.

Referenced by getSuperRegisterRegClass().

sc_iterator llvm::TargetRegisterClass::superregclasses_end (  )  const [inline]

Definition at line 167 of file TargetRegisterInfo.h.

Referenced by getSuperRegisterRegClass().

bool llvm::TargetRegisterClass::hasSubClass ( const TargetRegisterClass *  cs  )  const [inline]

hasSubClass - return true if the the specified TargetRegisterClass is a proper subset of this TargetRegisterClass.

Definition at line 175 of file TargetRegisterInfo.h.

Referenced by llvm::X86InstrInfo::copyRegToReg(), llvm::SystemZInstrInfo::copyRegToReg(), llvm::getCommonSubClass(), inClass(), isCC(), and isDCC().

sc_iterator llvm::TargetRegisterClass::subclasses_begin (  )  const [inline]

subclasses_begin / subclasses_end - Loop over all of the classes that are proper subsets of this register class.

Definition at line 184 of file TargetRegisterInfo.h.

Referenced by llvm::getCommonSubClass().

sc_iterator llvm::TargetRegisterClass::subclasses_end (  )  const [inline]

Definition at line 188 of file TargetRegisterInfo.h.

bool llvm::TargetRegisterClass::hasSuperClass ( const TargetRegisterClass *  cs  )  const [inline]

sc_iterator llvm::TargetRegisterClass::superclasses_begin (  )  const [inline]

superclasses_begin / superclasses_end - Loop over all of the classes that are proper supersets of this register class.

Definition at line 205 of file TargetRegisterInfo.h.

sc_iterator llvm::TargetRegisterClass::superclasses_end (  )  const [inline]

Definition at line 209 of file TargetRegisterInfo.h.

bool llvm::TargetRegisterClass::isASubClass (  )  const [inline]

isASubClass - return true if this TargetRegisterClass is a subset class of at least one other TargetRegisterClass.

Definition at line 217 of file TargetRegisterInfo.h.

virtual iterator llvm::TargetRegisterClass::allocation_order_begin ( const MachineFunction &  MF  )  const [inline, virtual]

allocation_order_begin/end - These methods define a range of registers which specify the registers in this class that are valid to register allocate, and the preferred order to allocate them in. For example, callee saved registers should be at the end of the list, because it is cheaper to allocate caller saved registers.

These methods take a MachineFunction argument, which can be used to tune the allocatable registers based on the characteristics of the function. One simple example is that the frame pointer register can be used if frame-pointer-elimination is performed.

By default, these methods return all registers in the class.

Definition at line 234 of file TargetRegisterInfo.h.

References begin().

Referenced by getAllocatableSetForRC(), llvm::TargetRegisterInfo::getAllocationOrder(), llvm::ARMBaseRegisterInfo::getAllocationOrder(), and isAllocatableRegister().

virtual iterator llvm::TargetRegisterClass::allocation_order_end ( const MachineFunction &  MF  )  const [inline, virtual]

unsigned llvm::TargetRegisterClass::getSize (  )  const [inline]

unsigned llvm::TargetRegisterClass::getAlignment (  )  const [inline]

int llvm::TargetRegisterClass::getCopyCost (  )  const [inline]

getCopyCost - Return the cost of copying a value between two registers in this class. A negative number means the register class is very expensive to copy e.g. status flag register classes.

Definition at line 252 of file TargetRegisterInfo.h.

Referenced by CheckForPhysRegDependency().


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