LLVM API Documentation
#include <XCoreFrameLowering.h>
Definition at line 24 of file XCoreFrameLowering.h.
Definition at line 213 of file XCoreFrameLowering.cpp.
void XCoreFrameLowering::eliminateCallFramePseudoInstr | ( | MachineFunction & | MF, |
MachineBasicBlock & | MBB, | ||
MachineBasicBlock::iterator | MI | ||
) | const [override, virtual] |
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.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 482 of file XCoreFrameLowering.cpp.
References Align(), llvm::BuildMI(), llvm::MachineBasicBlock::erase(), llvm::errs(), llvm::MachineInstr::getDebugLoc(), llvm::MachineOperand::getImm(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::TargetFrameLowering::getStackAlignment(), llvm::MachineFunction::getSubtarget(), llvm::TargetFrameLowering::hasReservedCallFrame(), I, llvm::MachineBasicBlock::insert(), isImmU16(), isImmU6(), llvm_unreachable, and TII.
void XCoreFrameLowering::emitEpilogue | ( | MachineFunction & | MF, |
MachineBasicBlock & | MBB | ||
) | const [override, virtual] |
Implements llvm::TargetFrameLowering.
Definition at line 341 of file XCoreFrameLowering.cpp.
References llvm::MachineInstr::addOperand(), llvm::BuildMI(), llvm::ISD::EH_RETURN, llvm::MachineBasicBlock::erase(), FramePtr, GetEHSpillList(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::MachineBasicBlock::getLastNonDebugInstr(), llvm::XCoreFunctionInfo::getLRSpillSlot(), llvm::MachineFrameInfo::getObjectOffset(), GetSpillList(), llvm::MachineFrameInfo::getStackSize(), llvm::MachineFunction::getSubtarget(), llvm::TargetSubtargetInfo::getTargetLowering(), hasFP(), llvm::XCoreFunctionInfo::hasLRSpillSlot(), IfNeededLDAWSP(), isImmU6(), RestoreSpillList(), and TII.
void XCoreFrameLowering::emitPrologue | ( | MachineFunction & | MF | ) | const [override, virtual] |
emitProlog/emitEpilog - These methods insert prolog and epilog code into the function.
Implements llvm::TargetFrameLowering.
Definition at line 223 of file XCoreFrameLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineBasicBlock::addLiveIn(), llvm::MachineInstrBuilder::addMemOperand(), llvm::MachineInstr::addRegisterKilled(), llvm::SmallVectorTemplateCommon< T >::begin(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), EmitCfiOffset(), EmitDefCfaOffset(), EmitDefCfaRegister(), llvm::SmallVectorTemplateCommon< T >::end(), FramePtr, llvm::MachineFunction::front(), llvm::Function::getAttributes(), llvm::MachineModuleInfo::getContext(), llvm::MCRegisterInfo::getDwarfRegNum(), GetEHSpillList(), llvm::CalleeSavedInfo::getFrameIdx(), getFrameIndexMMO(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::XCoreFunctionInfo::getLRSpillSlot(), llvm::MachineFrameInfo::getMaxAlignment(), llvm::MachineFunction::getMMI(), llvm::MachineFrameInfo::getObjectOffset(), llvm::CalleeSavedInfo::getReg(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MCContext::getRegisterInfo(), llvm::XCoreFunctionInfo::getSpillLabels(), GetSpillList(), llvm::TargetFrameLowering::getStackAlignment(), llvm::MachineFrameInfo::getStackSize(), llvm::MachineFunction::getSubtarget(), llvm::TargetSubtargetInfo::getTargetLowering(), llvm::AttributeSet::hasAttrSomewhere(), llvm::XCoreFunctionInfo::hasEHSpillSlot(), hasFP(), llvm::XCoreFunctionInfo::hasLRSpillSlot(), I, IfNeededExtSP(), isImmU6(), llvm::RegState::Kill, MaxImmU16, llvm::MachineMemOperand::MOStore, llvm::XCoreRegisterInfo::needsFrameMoves(), llvm::Attribute::Nest, llvm::report_fatal_error(), llvm::SmallVectorTemplateCommon< T >::size(), and TII.
bool XCoreFrameLowering::hasFP | ( | const MachineFunction & | MF | ) | const [override, virtual] |
hasFP - Return true if the specified function should have a dedicated frame pointer register. For most targets this is true only if the function has variable sized allocas or if frame pointer elimination is disabled.
Implements llvm::TargetFrameLowering.
Definition at line 218 of file XCoreFrameLowering.cpp.
References llvm::TargetOptions::DisableFramePointerElim(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getTarget(), llvm::MachineFrameInfo::hasVarSizedObjects(), and llvm::TargetMachine::Options.
Referenced by emitEpilogue(), emitPrologue(), processFunctionBeforeCalleeSavedScan(), processFunctionBeforeFrameFinalized(), restoreCalleeSavedRegisters(), and spillCalleeSavedRegisters().
void XCoreFrameLowering::processFunctionBeforeCalleeSavedScan | ( | MachineFunction & | MF, |
RegScavenger * | RS = nullptr |
||
) | const [override, virtual] |
processFunctionBeforeCalleeSavedScan - This method is called immediately before PrologEpilogInserter scans the physical registers used to determine what callee saved registers should be spilled. This method is optional.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 532 of file XCoreFrameLowering.cpp.
References llvm::MachineModuleInfo::callsEHReturn(), llvm::MachineModuleInfo::callsUnwindInit(), llvm::XCoreFunctionInfo::createEHSpillSlot(), llvm::XCoreFunctionInfo::createFPSpillSlot(), llvm::XCoreFunctionInfo::createLRSpillSlot(), llvm::MachineFrameInfo::estimateStackSize(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), llvm::MachineFunction::getMMI(), llvm::MachineFunction::getRegInfo(), hasFP(), llvm::MachineRegisterInfo::isPhysRegUsed(), llvm::Function::isVarArg(), and llvm::MachineRegisterInfo::setPhysRegUnused().
void XCoreFrameLowering::processFunctionBeforeFrameFinalized | ( | MachineFunction & | MF, |
RegScavenger * | RS = nullptr |
||
) | const [override, virtual] |
processFunctionBeforeFrameFinalized - This method is called immediately before the specified function's frame layout (MF.getFrameInfo()) is finalized. Once the frame is finalized, MO_FrameIndex operands are replaced with direct constants. This method is optional.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 567 of file XCoreFrameLowering.cpp.
References llvm::RegScavenger::addScavengingFrameIndex(), llvm::MachineFrameInfo::CreateStackObject(), llvm::TargetRegisterClass::getAlignment(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::TargetRegisterClass::getSize(), hasFP(), and llvm::XCoreFunctionInfo::isLargeFrame().
bool XCoreFrameLowering::restoreCalleeSavedRegisters | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MI, | ||
const std::vector< CalleeSavedInfo > & | CSI, | ||
const TargetRegisterInfo * | TRI | ||
) | const [override, virtual] |
restoreCalleeSavedRegisters - Issues instruction(s) to restore all callee saved registers and returns true if it isn't possible / profitable to do so by issuing a series of load instructions via loadRegToStackSlot(). Returns false otherwise.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 447 of file XCoreFrameLowering.cpp.
References llvm::MachineBasicBlock::begin(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::TargetRegisterInfo::getMinimalPhysRegClass(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getSubtarget(), hasFP(), llvm::TargetInstrInfo::loadRegFromStackSlot(), llvm::AArch64CC::MI, and TII.
bool XCoreFrameLowering::spillCalleeSavedRegisters | ( | MachineBasicBlock & | MBB, |
MachineBasicBlock::iterator | MI, | ||
const std::vector< CalleeSavedInfo > & | CSI, | ||
const TargetRegisterInfo * | TRI | ||
) | const [override, virtual] |
spillCalleeSavedRegisters - Issues instruction(s) to spill all callee saved registers and returns true if it isn't possible / profitable to do so by issuing a series of store instructions via storeRegToStackSlot(). Returns false otherwise.
Reimplemented from llvm::TargetFrameLowering.
Definition at line 411 of file XCoreFrameLowering.cpp.
References llvm::MachineBasicBlock::addLiveIn(), llvm::MachineBasicBlock::end(), llvm::MachineFunction::getInfo(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::TargetRegisterInfo::getMinimalPhysRegClass(), llvm::MachineBasicBlock::getParent(), llvm::XCoreFunctionInfo::getSpillLabels(), llvm::MachineFunction::getSubtarget(), hasFP(), llvm::AArch64CC::MI, llvm::XCoreRegisterInfo::needsFrameMoves(), llvm::SPII::Store, llvm::TargetInstrInfo::storeRegToStackSlot(), and TII.
static int llvm::XCoreFrameLowering::stackSlotSize | ( | ) | [inline, static] |
Stack slot size (4 bytes)
Definition at line 56 of file XCoreFrameLowering.h.