LLVM API Documentation

llvm::PPCRegisterInfo Class Reference

#include <PPCRegisterInfo.h>

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

List of all members.

Public Member Functions

 PPCRegisterInfo (const PPCSubtarget &SubTarget, const TargetInstrInfo &tii)
virtual const TargetRegisterClass * getPointerRegClass (unsigned Kind=0) const
const unsigned * getCalleeSavedRegs (const MachineFunction *MF=0) const
 Code Generation virtual methods...
const TargetRegisterClass *const * getCalleeSavedRegClasses (const MachineFunction *MF=0) const
BitVector getReservedRegs (const MachineFunction &MF) const
bool targetHandlesStackFrameRounding () const
bool requiresRegisterScavenging (const MachineFunction &MF) const
bool hasFP (const MachineFunction &MF) const
void eliminateCallFramePseudoInstr (MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const
void lowerDynamicAlloc (MachineBasicBlock::iterator II, int SPAdj, RegScavenger *RS) const
void lowerCRSpilling (MachineBasicBlock::iterator II, unsigned FrameIndex, int SPAdj, RegScavenger *RS) const
void eliminateFrameIndex (MachineBasicBlock::iterator II, int SPAdj, RegScavenger *RS=NULL) const
void determineFrameLayout (MachineFunction &MF) const
void processFunctionBeforeCalleeSavedScan (MachineFunction &MF, RegScavenger *RS=NULL) const
void processFunctionBeforeFrameFinalized (MachineFunction &MF) const
void emitPrologue (MachineFunction &MF) const
void emitEpilogue (MachineFunction &MF, MachineBasicBlock &MBB) const
unsigned getRARegister () const
unsigned getFrameRegister (MachineFunction &MF) const
void getInitialFrameState (std::vector< MachineMove > &Moves) const
unsigned getEHExceptionRegister () const
unsigned getEHHandlerRegister () const
int getDwarfRegNum (unsigned RegNum, bool isEH) const

Static Public Member Functions

static unsigned getRegisterNumbering (unsigned RegEnum)


Detailed Description

Definition at line 27 of file PPCRegisterInfo.h.


Constructor & Destructor Documentation

PPCRegisterInfo::PPCRegisterInfo ( const PPCSubtarget &  SubTarget,
const TargetInstrInfo &  tii 
)

Definition at line 120 of file PPCRegisterInfo.cpp.

References llvm::PPCISD::STD_32.


Member Function Documentation

unsigned PPCRegisterInfo::getRegisterNumbering ( unsigned  RegEnum  )  [static]

getRegisterNumbering - Given the enum value for some register, e.g. PPC::F14, return the number that it corresponds to (e.g. 14).

getRegisterNumbering - Given the enum value for some register, e.g. PPC::F14, return the number that it corresponds to (e.g. 14).

Definition at line 79 of file PPCRegisterInfo.cpp.

References llvm_unreachable, V0, and V1.

Referenced by HandleVRSaveUpdate(), lowerCRSpilling(), and processFunctionBeforeFrameFinalized().

const TargetRegisterClass * PPCRegisterInfo::getPointerRegClass ( unsigned  Kind = 0  )  const [virtual]

getPointerRegClass - Return the register class to use to hold pointers. This is used for addressing modes.

getPointerRegClass - Return the register class to use to hold pointers. This is used for addressing modes.

Definition at line 144 of file PPCRegisterInfo.cpp.

References llvm::PPCSubtarget::isPPC64().

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

Code Generation virtual methods...

Definition at line 151 of file PPCRegisterInfo.cpp.

References llvm::PPCSubtarget::isDarwinABI(), and llvm::PPCSubtarget::isPPC64().

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

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

bool llvm::PPCRegisterInfo::targetHandlesStackFrameRounding (  )  const [inline]

targetHandlesStackFrameRounding - Returns true if the target is responsible for rounding up the stack frame (probably at emitPrologue time).

Definition at line 53 of file PPCRegisterInfo.h.

bool PPCRegisterInfo::requiresRegisterScavenging ( const MachineFunction &  MF  )  const

requiresRegisterScavenging - We require a register scavenger. FIXME (64-bit): Should be inlined.

Definition at line 73 of file PPCRegisterInfo.cpp.

References EnableRegisterScavenging.

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

void PPCRegisterInfo::eliminateCallFramePseudoInstr ( MachineFunction &  MF,
MachineBasicBlock &  MBB,
MachineBasicBlock::iterator  I 
) const

void PPCRegisterInfo::lowerDynamicAlloc ( MachineBasicBlock::iterator  II,
int  SPAdj,
RegScavenger *  RS 
) const

void PPCRegisterInfo::lowerCRSpilling ( MachineBasicBlock::iterator  II,
unsigned  FrameIndex,
int  SPAdj,
RegScavenger *  RS 
) const

lowerCRSpilling - Generate the code for spilling a CR register. Instead of reserving a whole register (R0), we scrounge for one here. This generates code like this:

mfcr rA ; Move the conditional register into GPR rA. rlwinm rA, rA, SB, 0, 31 ; Shift the bits left so they are in CR0's slot. stw rA, FI ; Store rA to the frame.

Definition at line 660 of file PPCRegisterInfo.cpp.

References llvm::addFrameReference(), llvm::MachineInstrBuilder::addImm(), llvm::BuildMI(), llvm::MachineBasicBlock::erase(), findScratchRegister(), llvm::TargetInstrInfo::get(), llvm::MachineInstr::getDebugLoc(), llvm::MachineOperand::getImm(), llvm::getKillRegState(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), getRegisterNumbering(), llvm::RegState::ImplicitKill, llvm::MachineOperand::isKill(), llvm::PPCSubtarget::isPPC64(), llvm::RegState::Kill, MBB, llvm::PPCISD::MFCR, MI, and Reg.

Referenced by eliminateFrameIndex().

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

void PPCRegisterInfo::determineFrameLayout ( MachineFunction &  MF  )  const

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

void PPCRegisterInfo::processFunctionBeforeFrameFinalized ( MachineFunction &  MF  )  const

void PPCRegisterInfo::emitPrologue ( MachineFunction &  MF  )  const

Definition at line 1262 of file PPCRegisterInfo.cpp.

References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), ALIGN_STACK, llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::ISD::DBG_LABEL, determineFrameLayout(), llvm::Function::doesNotThrow(), E, llvm::MachineBasicBlock::end(), FI, llvm::MachineFunction::front(), llvm::TargetInstrInfo::get(), llvm::MachineFrameInfo::getCalleeSavedInfo(), llvm::TargetMachine::getFrameInfo(), llvm::MachineFunction::getFrameInfo(), llvm::MachineModuleInfo::getFrameMoves(), llvm::PPCFunctionInfo::getFramePointerSaveIndex(), llvm::PPCFrameInfo::getFramePointerSaveOffset(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), llvm::MachineFrameInfo::getMachineModuleInfo(), llvm::MachineFrameInfo::getMaxAlignment(), llvm::MachineFrameInfo::getObjectOffset(), llvm::PPCFrameInfo::getReturnSaveOffset(), llvm::TargetFrameInfo::getStackAlignment(), llvm::MachineFrameInfo::getStackSize(), llvm::MachineFunction::getTarget(), llvm::DebugLoc::getUnknownLoc(), HandleVRSaveUpdate(), llvm::MachineModuleInfo::hasDebugInfo(), hasFP(), llvm::PPCSubtarget::isDarwinABI(), llvm::isInt16(), llvm::isPowerOf2_32(), llvm::PPCSubtarget::isPPC64(), llvm::PPCSubtarget::isSVR4ABI(), llvm::RegState::Kill, llvm::Log2_32(), MBB, MBBI, MFI, MMI, llvm::PPCFunctionInfo::mustSaveLR(), MustSaveLR(), llvm::MachineModuleInfo::NextLabelID(), Offset, llvm::ISD::OR, Reg, llvm::UnwindTablesMandatory, and llvm::MachineLocation::VirtualFP.

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

unsigned PPCRegisterInfo::getRARegister (  )  const

Definition at line 1696 of file PPCRegisterInfo.cpp.

References llvm::PPCSubtarget::isPPC64().

Referenced by processFunctionBeforeCalleeSavedScan().

unsigned PPCRegisterInfo::getFrameRegister ( MachineFunction &  MF  )  const

Definition at line 1700 of file PPCRegisterInfo.cpp.

References hasFP(), and llvm::PPCSubtarget::isPPC64().

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

Definition at line 1707 of file PPCRegisterInfo.cpp.

References Src, and llvm::MachineLocation::VirtualFP.

unsigned PPCRegisterInfo::getEHExceptionRegister (  )  const

Definition at line 1715 of file PPCRegisterInfo.cpp.

References llvm::PPCSubtarget::isPPC64().

unsigned PPCRegisterInfo::getEHHandlerRegister (  )  const

Definition at line 1719 of file PPCRegisterInfo.cpp.

References llvm::PPCSubtarget::isPPC64().

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

Definition at line 1723 of file PPCRegisterInfo.cpp.


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