LLVM API Documentation
#include <MRegisterInfo.h>
Inheritance diagram for llvm::MRegisterInfo:
Public Types | |
typedef const TargetRegisterClass *const * | regclass_iterator |
enum | { NoRegister = 0, FirstVirtualRegister = 1024 } |
Public Member Functions | |
std::vector< bool > | getAllocatableSet (MachineFunction &MF) const |
const MRegisterDesc & | operator[] (unsigned RegNo) const |
const MRegisterDesc & | get (unsigned RegNo) const |
const unsigned * | getAliasSet (unsigned RegNo) const |
const char * | getName (unsigned RegNo) const |
unsigned | getSpillSize (unsigned RegNo) const |
unsigned | getSpillAlignment (unsigned RegNo) const |
unsigned | getNumRegs () const |
bool | areAliases (unsigned regA, unsigned regB) const |
virtual const unsigned * | getCalleeSaveRegs () const =0 |
regclass_iterator | regclass_begin () const |
regclass_iterator | regclass_end () const |
unsigned | getNumRegClasses () const |
virtual void | storeRegToStackSlot (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, unsigned SrcReg, int FrameIndex) const =0 |
virtual void | loadRegFromStackSlot (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, unsigned DestReg, int FrameIndex) const =0 |
virtual void | copyRegToReg (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, unsigned DestReg, unsigned SrcReg, const TargetRegisterClass *RC) const =0 |
virtual MachineInstr * | foldMemoryOperand (MachineInstr *MI, unsigned OpNum, int FrameIndex) const |
int | getCallFrameSetupOpcode () const |
int | getCallFrameDestroyOpcode () const |
virtual void | eliminateCallFramePseudoInstr (MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const |
virtual void | processFunctionBeforeFrameFinalized (MachineFunction &MF) const |
virtual void | eliminateFrameIndex (MachineBasicBlock::iterator MI) const =0 |
virtual void | emitPrologue (MachineFunction &MF) const =0 |
virtual void | emitEpilogue (MachineFunction &MF, MachineBasicBlock &MBB) const =0 |
Static Public Member Functions | |
static bool | isPhysicalRegister (unsigned Reg) |
static bool | isVirtualRegister (unsigned Reg) |
Protected Member Functions | |
MRegisterInfo (const MRegisterDesc *D, unsigned NR, regclass_iterator RegClassBegin, regclass_iterator RegClassEnd, int CallFrameSetupOpcode=-1, int CallFrameDestroyOpcode=-1) | |
virtual | ~MRegisterInfo () |
Definition at line 113 of file MRegisterInfo.h.
|
Definition at line 115 of file MRegisterInfo.h. |
|
Definition at line 130 of file MRegisterInfo.h. |
|
Definition at line 18 of file MRegisterInfo.cpp. References FirstVirtualRegister. |
|
Definition at line 29 of file MRegisterInfo.cpp. |
|
areAliases - Returns true if the two registers alias each other, false otherwise Definition at line 211 of file MRegisterInfo.h. References getAliasSet(). |
|
Implemented in llvm::SparcV9RegisterInfo. |
|
eliminateCallFramePseudoInstr - This method is called during prolog/epilog code insertion to eliminate call frame setup and destroy pseudo instructions (but only if the Target is using them). It is responsible for eliminating these instructions, replacing them with concrete instructions. This method need only be implemented if using call frame setup/destroy pseudo instructions. Definition at line 284 of file MRegisterInfo.h. References getCallFrameDestroyOpcode(), and getCallFrameSetupOpcode(). |
|
eliminateFrameIndex - This method must be overriden to eliminate abstract frame indices from instructions which may use them. The instruction referenced by the iterator contains an MO_FrameIndex operand which must be eliminated by this method. This method may modify or replace the specified instruction, as long as it keeps the iterator pointing the the finished product. The return value is the number of instructions added to (negative if removed from) the basic block. Implemented in llvm::SparcV9RegisterInfo. |
|
Implemented in llvm::SparcV9RegisterInfo. |
|
emitProlog/emitEpilog - These methods insert prolog and epilog code into the function. The return value is the number of instructions added to (negative if removed from) the basic block (entry for prologue). Implemented in llvm::SparcV9RegisterInfo. |
|
foldMemoryOperand - Attempt to fold a load or store of the specified stack slot into the specified machine instruction for the specified operand. If this is possible, a new instruction is returned with the specified operand folded, otherwise NULL is returned. The client is responsible for removing the old instruction and adding the new one in the instruction stream Definition at line 260 of file MRegisterInfo.h. Referenced by llvm::LiveIntervals::addIntervalsForSpills(). |
|
Provide a get method, equivalent to [], but more useful if we have a pointer to this object. Definition at line 175 of file MRegisterInfo.h. References operator[](). Referenced by getAliasSet(), getName(), getSpillAlignment(), and getSpillSize(). |
|
getAliasSet - Return the set of registers aliased by the specified register, or a null list of there are none. The list returned is zero terminated. Definition at line 181 of file MRegisterInfo.h. References llvm::MRegisterDesc::AliasSet, and get(). Referenced by llvm::PhysRegTracker::addRegUse(), areAliases(), llvm::PhysRegTracker::delRegUse(), and updateSpillWeights(). |
|
getAllocatableSet - Returns a bitset indexed by register number indicating if a register is allocatable or not. Definition at line 31 of file MRegisterInfo.cpp. References llvm::TargetRegisterClass::allocation_order_begin(), llvm::TargetRegisterClass::allocation_order_end(), E, I, regclass_begin(), and regclass_end(). Referenced by llvm::LiveVariables::runOnMachineFunction(), and llvm::LiveIntervals::runOnMachineFunction(). |
|
Implemented in llvm::SparcV9RegisterInfo. |
|
Definition at line 273 of file MRegisterInfo.h. Referenced by eliminateCallFramePseudoInstr(). |
|
getCallFrameSetup/DestroyOpcode - These methods return the opcode of the frame setup/destroy instructions if they exist (-1 otherwise). Some targets use pseudo instructions in order to abstract away the difference between operating with a frame pointer and operating without, through the use of these two instructions. Definition at line 272 of file MRegisterInfo.h. Referenced by eliminateCallFramePseudoInstr(). |
|
getName - Return the symbolic target specific name for the specified physical register. Definition at line 187 of file MRegisterInfo.h. References get(), and llvm::MRegisterDesc::Name. Referenced by llvm::VirtRegMap::print(). |
|
Definition at line 229 of file MRegisterInfo.h. References regclass_begin(), and regclass_end(). |
|
getNumRegs - Return the number of registers this target has (useful for sizing arrays holding per register information) Definition at line 205 of file MRegisterInfo.h. Referenced by llvm::LiveVariables::runOnMachineFunction(). |
|
getSpillAlignment - Return the alignment required by a stack slot used to spill register into. Definition at line 199 of file MRegisterInfo.h. References get(), and llvm::MRegisterDesc::SpillAlignment. |
|
getSpillSize - Return the size in bits required of a stack slot used to spill register into. Definition at line 193 of file MRegisterInfo.h. References get(), and llvm::MRegisterDesc::SpillSize. |
|
isPhysicalRegister - Return true if the specified register number is in the physical register namespace. Definition at line 150 of file MRegisterInfo.h. References FirstVirtualRegister. Referenced by llvm::PhysRegTracker::addRegUse(), llvm::VirtRegMap::assignVirt2Phys(), llvm::PhysRegTracker::delRegUse(), llvm::PhysRegTracker::isRegAvail(), OutputReg(), and llvm::LiveVariables::runOnMachineFunction(). |
|
isVirtualRegister - Return true if the specified register number is in the virtual register namespace. Definition at line 157 of file MRegisterInfo.h. References FirstVirtualRegister. Referenced by llvm::VirtRegMap::assignVirt2Phys(), llvm::VirtRegMap::assignVirt2StackSlot(), llvm::VirtRegMap::clearVirt(), llvm::VirtRegMap::getPhys(), llvm::VirtRegMap::getStackSlot(), llvm::LiveVariables::getVarInfo(), getX86RegNum(), llvm::LiveVariables::instructionChanged(), llvm::LiveVariables::runOnMachineFunction(), and llvm::LiveIntervals::runOnMachineFunction(). |
|
Implemented in llvm::SparcV9RegisterInfo. |
|
Definition at line 166 of file MRegisterInfo.h. Referenced by get(). |
|
processFunctionBeforeFrameFinalized - This method is called immediately before the specified functions frame layout (MF.getFrameInfo()) is finalized. Once the frame is finalized, MO_FrameIndex operands are replaced with direct constants. This method is optional. The return value is the number of instructions added to (negative if removed from) the basic block Definition at line 300 of file MRegisterInfo.h. |
|
Register class iterators Definition at line 226 of file MRegisterInfo.h. Referenced by getAllocatableSet(), and getNumRegClasses(). |
|
Definition at line 227 of file MRegisterInfo.h. Referenced by getAllocatableSet(), and getNumRegClasses(). |
|
Implemented in llvm::SparcV9RegisterInfo. |