LLVM API Documentation

llvm::X86RegisterInfo Class Reference

#include <X86RegisterInfo.h>

Inheritance diagram for llvm::X86RegisterInfo:
[legend]
Collaboration diagram for llvm::X86RegisterInfo:
[legend]

List of all members.

Public Member Functions

 X86RegisterInfo (X86TargetMachine &tm, const TargetInstrInfo &tii)
unsigned getStackAlignment () const
int getDwarfRegNum (unsigned RegNum, bool isEH) const
const TargetRegisterClass * getCrossCopyRegClass (const TargetRegisterClass *RC) const
const unsigned * getCalleeSavedRegs (const MachineFunction *MF=0) const
const TargetRegisterClass *const * getCalleeSavedRegClasses (const MachineFunction *MF=0) const
BitVector getReservedRegs (const MachineFunction &MF) const
bool hasFP (const MachineFunction &MF) const
bool needsStackRealignment (const MachineFunction &MF) const
bool hasReservedCallFrame (MachineFunction &MF) const
void eliminateCallFramePseudoInstr (MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const
void eliminateFrameIndex (MachineBasicBlock::iterator MI, int SPAdj, RegScavenger *RS=NULL) const
void processFunctionBeforeFrameFinalized (MachineFunction &MF) const
void processFunctionBeforeCalleeSavedScan (MachineFunction &MF, RegScavenger *RS=NULL) const
void emitPrologue (MachineFunction &MF) const
void emitEpilogue (MachineFunction &MF, MachineBasicBlock &MBB) const
void emitFrameMoves (MachineFunction &MF, unsigned FrameLabelId, unsigned ReadyLabelId) const
unsigned getRARegister () const
unsigned getFrameRegister (MachineFunction &MF) const
int getFrameIndexOffset (MachineFunction &MF, int FI) const
void getInitialFrameState (std::vector< MachineMove > &Moves) const
unsigned getEHExceptionRegister () const
unsigned getEHHandlerRegister () const

Static Public Member Functions

static unsigned getX86RegNum (unsigned RegNo)

Public Attributes

X86TargetMachine & TM
const TargetInstrInfo & TII


Detailed Description

Definition at line 50 of file X86RegisterInfo.h.


Constructor & Destructor Documentation

X86RegisterInfo::X86RegisterInfo ( X86TargetMachine &  tm,
const TargetInstrInfo &  tii 
)


Member Function Documentation

unsigned X86RegisterInfo::getX86RegNum ( unsigned  RegNo  )  [static]

getX86RegNum - Returns the native X86 register number for the given LLVM register identifier.

Definition at line 94 of file X86RegisterInfo.cpp.

References llvm::ARMCC::AL, llvm::XCoreISD::BL, llvm::N86::EAX, llvm::N86::EBP, llvm::N86::EBX, llvm::N86::ECX, llvm::N86::EDI, llvm::N86::EDX, llvm::N86::ESI, and llvm::N86::ESP.

Referenced by getMemModRMByteSize().

unsigned llvm::X86RegisterInfo::getStackAlignment (  )  const [inline]

int X86RegisterInfo::getDwarfRegNum ( unsigned  RegNum,
bool  isEH 
) const

getDwarfRegNum - allows modification of X86GenRegisterInfo::getDwarfRegNum (created by TableGen) for target dependencies.

Definition at line 71 of file X86RegisterInfo.cpp.

References llvm::TargetMachine::getSubtarget(), llvm::X86Subtarget::is64Bit(), llvm::X86Subtarget::isTargetCygMing(), llvm::X86Subtarget::isTargetDarwin(), Subtarget, TM, llvm::DWARFFlavour::X86_32_DarwinEH, llvm::DWARFFlavour::X86_32_Generic, and llvm::DWARFFlavour::X86_64.

const TargetRegisterClass * X86RegisterInfo::getCrossCopyRegClass ( const TargetRegisterClass *  RC  )  const

Code Generation virtual methods... getCrossCopyRegClass - Returns a legal register class to copy a register in the specified class to or from. Returns NULL if it is possible to copy between a two registers of the specified class.

Definition at line 155 of file X86RegisterInfo.cpp.

const unsigned * X86RegisterInfo::getCalleeSavedRegs ( const MachineFunction *  MF = 0  )  const

getCalleeSavedRegs - Return a null-terminated list of all of the callee-save registers on this target.

Definition at line 166 of file X86RegisterInfo.cpp.

References llvm::MachineModuleInfo::callsEHReturn(), llvm::N86::EAX, llvm::N86::EBP, llvm::N86::EBX, llvm::N86::EDI, llvm::N86::EDX, llvm::N86::ESI, llvm::MachineFunction::getFrameInfo(), llvm::MachineFrameInfo::getMachineModuleInfo(), MFI, and MMI.

const TargetRegisterClass *const * X86RegisterInfo::getCalleeSavedRegClasses ( const MachineFunction *  MF = 0  )  const

getCalleeSavedRegClasses - Return a null-terminated list of the preferred register classes to spill each callee-saved register with. The order and length of this list match the getCalleeSavedRegs() list.

Definition at line 211 of file X86RegisterInfo.cpp.

References llvm::MachineModuleInfo::callsEHReturn(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFrameInfo::getMachineModuleInfo(), MFI, and MMI.

BitVector X86RegisterInfo::getReservedRegs ( const MachineFunction &  MF  )  const

getReservedRegs - Returns a bitset indexed by physical register number indicating if a register is a special register that has particular uses and should be considered unavailable at all times, e.g. SP, RA. This is used by register scavenger to determine what registers are free.

Definition at line 264 of file X86RegisterInfo.cpp.

References llvm::N86::EBP, llvm::N86::ESP, hasFP(), and llvm::BitVector::set().

bool X86RegisterInfo::hasFP ( const MachineFunction &  MF  )  const

bool X86RegisterInfo::needsStackRealignment ( const MachineFunction &  MF  )  const

bool X86RegisterInfo::hasReservedCallFrame ( MachineFunction &  MF  )  const

void X86RegisterInfo::eliminateCallFramePseudoInstr ( MachineFunction &  MF,
MachineBasicBlock &  MBB,
MachineBasicBlock::iterator  MI 
) const

void X86RegisterInfo::eliminateFrameIndex ( MachineBasicBlock::iterator  MI,
int  SPAdj,
RegScavenger *  RS = NULL 
) const

void X86RegisterInfo::processFunctionBeforeFrameFinalized ( MachineFunction &  MF  )  const

void X86RegisterInfo::processFunctionBeforeCalleeSavedScan ( MachineFunction &  MF,
RegScavenger *  RS = NULL 
) const

void X86RegisterInfo::emitPrologue ( MachineFunction &  MF  )  const

Definition at line 707 of file X86RegisterInfo.cpp.

References llvm::MachineInstrBuilder::addImm(), llvm::addRegOffset(), llvm::ARMCC::AL, llvm::MachineFunction::begin(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::ISD::DBG_LABEL, llvm::DisableRedZone, llvm::Function::doesNotThrow(), E, llvm::N86::EAX, emitFrameMoves(), emitSPUpdate(), llvm::MachineBasicBlock::end(), llvm::MachineFunction::end(), llvm::MachineFunction::front(), llvm::TargetInstrInfo::get(), llvm::X86MachineFunctionInfo::getCalleeSavedFrameSize(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), llvm::MachineFrameInfo::getMachineModuleInfo(), llvm::MachineFrameInfo::getMaxAlignment(), llvm::MachineInstr::getOperand(), llvm::MachineFunction::getRegInfo(), llvm::MachineFrameInfo::getStackSize(), llvm::TargetMachine::getSubtarget(), llvm::MachineFunction::getTarget(), llvm::X86MachineFunctionInfo::getTCReturnAddrDelta(), llvm::MachineFrameInfo::hasCalls(), hasFP(), llvm::MachineFrameInfo::hasVarSizedObjects(), II, llvm::MachineBasicBlock::insert(), llvm::X86Subtarget::isTargetCygMing(), llvm::MachineRegisterInfo::livein_begin(), llvm::MachineRegisterInfo::livein_end(), MBB, MBBI, mergeSPUpdates(), mergeSPUpdatesDown(), MFI, MI, MMI, needsStackRealignment(), llvm::next(), Reg, llvm::X86MachineFunctionInfo::setCalleeSavedFrameSize(), llvm::MachineOperand::setIsDead(), llvm::MachineFrameInfo::setOffsetAdjustment(), llvm::MachineFrameInfo::setStackSize(), Subtarget, TII, and llvm::UnwindTablesMandatory.

void X86RegisterInfo::emitEpilogue ( MachineFunction &  MF,
MachineBasicBlock &  MBB 
) const

void X86RegisterInfo::emitFrameMoves ( MachineFunction &  MF,
unsigned  FrameLabelId,
unsigned  ReadyLabelId 
) const

unsigned X86RegisterInfo::getRARegister (  )  const

Definition at line 1006 of file X86RegisterInfo.cpp.

Referenced by getInitialFrameState().

unsigned X86RegisterInfo::getFrameRegister ( MachineFunction &  MF  )  const

Definition at line 1013 of file X86RegisterInfo.cpp.

References hasFP().

int X86RegisterInfo::getFrameIndexOffset ( MachineFunction &  MF,
int  FI 
) const

void X86RegisterInfo::getInitialFrameState ( std::vector< MachineMove > &  Moves  )  const

Definition at line 1017 of file X86RegisterInfo.cpp.

References getRARegister(), Src, and llvm::MachineLocation::VirtualFP.

unsigned X86RegisterInfo::getEHExceptionRegister (  )  const

Definition at line 1033 of file X86RegisterInfo.cpp.

unsigned X86RegisterInfo::getEHHandlerRegister (  )  const

Definition at line 1038 of file X86RegisterInfo.cpp.


Member Data Documentation

Definition at line 52 of file X86RegisterInfo.h.

Referenced by getDwarfRegNum(), and X86RegisterInfo().

Definition at line 53 of file X86RegisterInfo.h.

Referenced by eliminateCallFramePseudoInstr(), emitEpilogue(), and emitPrologue().


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