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 MVT * vt_iterator
typedef const
TargetRegisterClass *const * 
sc_iterator

Public Member Functions

 TargetRegisterClass (unsigned id, const MVT *vts, const TargetRegisterClass *const *subcs, const TargetRegisterClass *const *supcs, unsigned RS, unsigned Al, int CC, iterator RB, iterator RE)
virtual ~TargetRegisterClass ()
unsigned getID () const
iterator begin () const
iterator end () const
unsigned getNumRegs () const
unsigned getRegister (unsigned i) const
bool contains (unsigned Reg) const
bool hasType (MVT vt) const
vt_iterator vt_begin () const
vt_iterator vt_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 50 of file TargetRegisterInfo.h.


Member Typedef Documentation

Definition at line 52 of file TargetRegisterInfo.h.

Definition at line 53 of file TargetRegisterInfo.h.

Definition at line 55 of file TargetRegisterInfo.h.

Definition at line 56 of file TargetRegisterInfo.h.


Constructor & Destructor Documentation

llvm::TargetRegisterClass::TargetRegisterClass ( unsigned  id,
const MVT *  vts,
const TargetRegisterClass *const *  subcs,
const TargetRegisterClass *const *  supcs,
unsigned  RS,
unsigned  Al,
int  CC,
iterator  RB,
iterator  RE 
) [inline]

Definition at line 67 of file TargetRegisterInfo.h.

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

Definition at line 75 of file TargetRegisterInfo.h.


Member Function Documentation

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

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

begin/end - Return all of the registers in this class.

Definition at line 83 of file TargetRegisterInfo.h.

Referenced by allocation_order_begin(), contains(), CreateRegClassMask(), findSuperReg(), and llvm::TargetLowering::getRegForInlineAsmConstraint().

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

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

getNumRegs - Return the number of registers in this class.

Definition at line 88 of file TargetRegisterInfo.h.

Referenced by getRegister().

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

getRegister - Return the specified register in the class.

Definition at line 92 of file TargetRegisterInfo.h.

References getNumRegs().

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

contains - Return true if the specified register is included in this register class.

Definition at line 99 of file TargetRegisterInfo.h.

References begin(), E, and end().

Referenced by AddLiveIn(), getMatchingSuperReg(), and llvm::TargetRegisterInfo::getPhysicalRegisterRegClass().

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

hasType - return true if this TargetRegisterClass has the ValueType vt.

Definition at line 107 of file TargetRegisterInfo.h.

References llvm::MVT::Other.

Referenced by llvm::TargetRegisterInfo::getPhysicalRegisterRegClass().

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 116 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]

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

hasSubClass - return true if the specified TargetRegisterClass is a sub-register class of this TargetRegisterClass.

Definition at line 128 of file TargetRegisterInfo.h.

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

subclasses_begin / subclasses_end - Loop over all of the sub-classes of this register class.

Definition at line 137 of file TargetRegisterInfo.h.

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

Definition at line 141 of file TargetRegisterInfo.h.

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

hasSuperClass - return true if the specified TargetRegisterClass is a super-register class of this TargetRegisterClass.

Definition at line 149 of file TargetRegisterInfo.h.

Referenced by llvm::TargetRegisterInfo::getPhysicalRegisterRegClass().

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

superclasses_begin / superclasses_end - Loop over all of the super-classes of this register class.

Definition at line 158 of file TargetRegisterInfo.h.

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

Definition at line 162 of file TargetRegisterInfo.h.

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

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

Definition at line 170 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 187 of file TargetRegisterInfo.h.

References begin().

Referenced by getAllocatableSetForRC(), and isAllocatableRegister().

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

Definition at line 190 of file TargetRegisterInfo.h.

References end().

Referenced by getAllocatableSetForRC(), and isAllocatableRegister().

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

getSize - Return the size of the register in bytes, which is also the size of a stack slot allocated to hold a spilled copy of this register.

Definition at line 198 of file TargetRegisterInfo.h.

Referenced by llvm::VirtRegMap::assignVirt2StackSlot(), llvm::VirtRegMap::getEmergencySpillSlot(), llvm::XCoreRegisterInfo::processFunctionBeforeCalleeSavedScan(), llvm::PPCRegisterInfo::processFunctionBeforeCalleeSavedScan(), and llvm::ARMRegisterInfo::processFunctionBeforeCalleeSavedScan().

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.

Definition at line 206 of file TargetRegisterInfo.h.

Referenced by CheckForPhysRegDependency().


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