LLVM API Documentation
#include <PPCRegisterInfo.h>


Definition at line 27 of file PPCRegisterInfo.h.
| PPCRegisterInfo::PPCRegisterInfo | ( | const PPCSubtarget & | SubTarget, | |
| const TargetInstrInfo & | tii | |||
| ) |
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 77 of file PPCRegisterInfo.cpp.
References llvm::cerr(), V0, and V1.
Referenced by HandleVRSaveUpdate(), and lowerCRSpilling().
| const unsigned * PPCRegisterInfo::getCalleeSavedRegs | ( | const MachineFunction * | MF = 0 |
) | const |
Code Generation virtual methods...
Definition at line 141 of file PPCRegisterInfo.cpp.
References llvm::PPCSubtarget::isMachoABI(), and llvm::PPCSubtarget::isPPC64().
| const TargetRegisterClass *const * PPCRegisterInfo::getCalleeSavedRegClasses | ( | const MachineFunction * | MF = 0 |
) | const |
Definition at line 229 of file PPCRegisterInfo.cpp.
References llvm::PPCSubtarget::isMachoABI(), and llvm::PPCSubtarget::isPPC64().
| BitVector PPCRegisterInfo::getReservedRegs | ( | const MachineFunction & | MF | ) | const |
Definition at line 344 of file PPCRegisterInfo.cpp.
References EnableRegisterScavenging, llvm::PPCSubtarget::isDarwin(), llvm::PPCSubtarget::isPPC64(), needsFP(), and llvm::BitVector::set().
| 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 49 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 71 of file PPCRegisterInfo.cpp.
References EnableRegisterScavenging.
| bool PPCRegisterInfo::hasFP | ( | const MachineFunction & | MF | ) | const |
Definition at line 385 of file PPCRegisterInfo.cpp.
References llvm::MachineFunction::getFrameInfo(), llvm::MachineFrameInfo::getStackSize(), MFI, and needsFP().
Referenced by eliminateFrameIndex(), emitEpilogue(), emitPrologue(), and getFrameRegister().
| void PPCRegisterInfo::eliminateCallFramePseudoInstr | ( | MachineFunction & | MF, | |
| MachineBasicBlock & | MBB, | |||
| MachineBasicBlock::iterator | I | |||
| ) | const |
Definition at line 407 of file PPCRegisterInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), llvm::MachineBasicBlock::erase(), llvm::TargetInstrInfo::get(), llvm::isInt16(), llvm::PPCSubtarget::isPPC64(), MBBI, and llvm::PerformTailCallOpt.
| void PPCRegisterInfo::lowerDynamicAlloc | ( | MachineBasicBlock::iterator | II, | |
| int | SPAdj, | |||
| RegScavenger * | RS | |||
| ) | const |
lowerDynamicAlloc - Generate the code for allocating an object in the current frame. The sequence of code with be in the general form
addi R0, SP, frameSize ; get the address of the previous frame stwxu R0, SP, Rnegsize ; add and update the SP with the negated size addi Rnew, SP, maxCalFrameSize ; get the top of the allocation
Definition at line 463 of file PPCRegisterInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), EnableRegisterScavenging, llvm::MachineBasicBlock::erase(), findScratchRegister(), llvm::TargetInstrInfo::get(), llvm::TargetMachine::getFrameInfo(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFrameInfo::getMaxAlignment(), llvm::MachineFrameInfo::getMaxCallFrameSize(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::TargetFrameInfo::getStackAlignment(), llvm::MachineFrameInfo::getStackSize(), llvm::MachineFunction::getTarget(), llvm::isInt16(), llvm::MachineOperand::isKill(), llvm::PPCSubtarget::isPPC64(), MBB, MF, MFI, MI, and Reg.
Referenced by eliminateFrameIndex().
| 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 577 of file PPCRegisterInfo.cpp.
References llvm::addFrameReference(), llvm::MachineInstrBuilder::addImm(), llvm::BuildMI(), llvm::MachineBasicBlock::erase(), findScratchRegister(), llvm::TargetInstrInfo::get(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), getRegisterNumbering(), llvm::MachineOperand::isKill(), llvm::PPCSubtarget::isPPC64(), MBB, llvm::PPCISD::MFCR, MI, and Reg.
Referenced by eliminateFrameIndex().
| void PPCRegisterInfo::eliminateFrameIndex | ( | MachineBasicBlock::iterator | II, | |
| int | SPAdj, | |||
| RegScavenger * | RS = NULL | |||
| ) | const |
Definition at line 618 of file PPCRegisterInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::BuildMI(), llvm::MachineOperand::ChangeToImmediate(), llvm::MachineOperand::ChangeToRegister(), llvm::PPCISD::DYNALLOC, EnableRegisterScavenging, FI, findScratchRegister(), FrameIndex, llvm::TargetInstrInfo::get(), llvm::MachineFunction::getFrameInfo(), llvm::PPCFunctionInfo::getFramePointerSaveIndex(), llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::MachineFunction::getInfo(), llvm::MachineInstr::getNumOperands(), llvm::MachineFrameInfo::getObjectOffset(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineFrameInfo::getStackSize(), hasFP(), llvm::TargetInstrInfo::INLINEASM, llvm::MachineOperand::isFI(), llvm::isInt16(), lowerCRSpilling(), lowerDynamicAlloc(), MBB, MF, MFI, MI, Offset, llvm::MachineInstr::setDesc(), and llvm::PPCISD::STD_32.
| void PPCRegisterInfo::determineFrameLayout | ( | MachineFunction & | MF | ) | const |
determineFrameLayout - Determine the size of the frame and maximum call frame size.
determineFrameLayout - Determine the size of the frame and maximum call frame size.
Definition at line 881 of file PPCRegisterInfo.cpp.
References ALIGN_STACK, llvm::TargetMachine::getFrameInfo(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFrameInfo::getMaxAlignment(), llvm::MachineFrameInfo::getMaxCallFrameSize(), llvm::PPCFrameInfo::getMinCallFrameSize(), llvm::TargetFrameInfo::getStackAlignment(), llvm::MachineFrameInfo::getStackSize(), llvm::MachineFunction::getTarget(), llvm::MachineFrameInfo::hasCalls(), llvm::MachineFrameInfo::hasVarSizedObjects(), llvm::PPCSubtarget::isMachoABI(), llvm::PPCSubtarget::isPPC64(), MFI, llvm::MachineFrameInfo::setMaxCallFrameSize(), and llvm::MachineFrameInfo::setStackSize().
Referenced by emitPrologue().
| void PPCRegisterInfo::processFunctionBeforeCalleeSavedScan | ( | MachineFunction & | MF, | |
| RegScavenger * | RS = NULL | |||
| ) | const |
Definition at line 933 of file PPCRegisterInfo.cpp.
References llvm::MachineFrameInfo::CreateFixedObject(), llvm::MachineFrameInfo::CreateStackObject(), EnableRegisterScavenging, FI, llvm::TargetRegisterClass::getAlignment(), llvm::MachineFunction::getFrameInfo(), llvm::PPCFunctionInfo::getFramePointerSaveIndex(), llvm::PPCFrameInfo::getFramePointerSaveOffset(), llvm::MachineFunction::getInfo(), getRARegister(), llvm::MachineFunction::getRegInfo(), llvm::TargetRegisterClass::getSize(), llvm::PPCFunctionInfo::getTailCallSPDelta(), llvm::MachineFrameInfo::hasVarSizedObjects(), llvm::PPCSubtarget::isELF32_ABI(), llvm::PPCSubtarget::isMachoABI(), llvm::PPCSubtarget::isPPC64(), MFI, MustSaveLR(), needsFP(), llvm::NoFramePointerElim, llvm::PerformTailCallOpt, llvm::PPCFunctionInfo::setFramePointerSaveIndex(), llvm::PPCFunctionInfo::setMustSaveLR(), llvm::MachineRegisterInfo::setPhysRegUnused(), llvm::RegScavenger::setScavengingFrameIndex(), and spillsCR().
| void PPCRegisterInfo::emitPrologue | ( | MachineFunction & | MF | ) | const |
Definition at line 985 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::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(), HandleVRSaveUpdate(), llvm::MachineModuleInfo::hasDebugInfo(), hasFP(), I, llvm::isInt16(), llvm::PPCSubtarget::isMachoABI(), llvm::isPowerOf2_32(), llvm::PPCSubtarget::isPPC64(), 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 |
Definition at line 1201 of file PPCRegisterInfo.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addReg(), ALIGN_STACK, llvm::BuildMI(), llvm::MachineBasicBlock::end(), llvm::CallingConv::Fast, FI, llvm::TargetInstrInfo::get(), llvm::Function::getCallingConv(), llvm::TargetMachine::getFrameInfo(), llvm::MachineFunction::getFrameInfo(), llvm::PPCFrameInfo::getFramePointerSaveOffset(), llvm::MachineFunction::getFunction(), llvm::MachineOperand::getImm(), llvm::MachineFunction::getInfo(), llvm::MachineFrameInfo::getMaxAlignment(), llvm::PPCFunctionInfo::getMinReservedArea(), llvm::PPCFrameInfo::getReturnSaveOffset(), llvm::TargetFrameInfo::getStackAlignment(), llvm::MachineFrameInfo::getStackSize(), llvm::PPCFunctionInfo::getTailCallSPDelta(), llvm::MachineFunction::getTarget(), llvm::PPCFunctionInfo::hasFastCall(), hasFP(), llvm::MachineFrameInfo::hasVarSizedObjects(), llvm::MachineOperand::isImm(), llvm::isInt16(), llvm::PPCSubtarget::isMachoABI(), llvm::PPCSubtarget::isPPC64(), MBBI, MFI, llvm::PPCFunctionInfo::mustSaveLR(), MustSaveLR(), llvm::PerformTailCallOpt, and llvm::prior().
| unsigned PPCRegisterInfo::getRARegister | ( | ) | const |
Definition at line 1395 of file PPCRegisterInfo.cpp.
References llvm::PPCSubtarget::isPPC64().
Referenced by processFunctionBeforeCalleeSavedScan().
| unsigned PPCRegisterInfo::getFrameRegister | ( | MachineFunction & | MF | ) | const |
Definition at line 1399 of file PPCRegisterInfo.cpp.
References hasFP(), and llvm::PPCSubtarget::isPPC64().
| void PPCRegisterInfo::getInitialFrameState | ( | std::vector< MachineMove > & | Moves | ) | const |
Definition at line 1406 of file PPCRegisterInfo.cpp.
References Src, and llvm::MachineLocation::VirtualFP.
| unsigned PPCRegisterInfo::getEHExceptionRegister | ( | ) | const |
| unsigned PPCRegisterInfo::getEHHandlerRegister | ( | ) | const |
| int PPCRegisterInfo::getDwarfRegNum | ( | unsigned | RegNum, | |
| bool | isEH | |||
| ) | const |
Definition at line 1422 of file PPCRegisterInfo.cpp.
This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.