LLVM API Documentation

Public Member Functions
llvm::MipsSEFrameLowering Class Reference

#include <MipsSEFrameLowering.h>

Inheritance diagram for llvm::MipsSEFrameLowering:
Inheritance graph
[legend]
Collaboration diagram for llvm::MipsSEFrameLowering:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 MipsSEFrameLowering (const MipsSubtarget &STI)
void emitPrologue (MachineFunction &MF) const override
void emitEpilogue (MachineFunction &MF, MachineBasicBlock &MBB) const override
void eliminateCallFramePseudoInstr (MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const override
bool spillCalleeSavedRegisters (MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector< CalleeSavedInfo > &CSI, const TargetRegisterInfo *TRI) const override
bool hasReservedCallFrame (const MachineFunction &MF) const override
void processFunctionBeforeCalleeSavedScan (MachineFunction &MF, RegScavenger *RS) const override
unsigned ehDataReg (unsigned I) const

Detailed Description

Definition at line 21 of file MipsSEFrameLowering.h.


Constructor & Destructor Documentation

Definition at line 395 of file MipsSEFrameLowering.cpp.


Member Function Documentation

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 643 of file MipsSEFrameLowering.cpp.

References llvm::MipsSEInstrInfo::adjustStackPtr(), llvm::MachineBasicBlock::erase(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::MachineFunction::getSubtarget(), hasReservedCallFrame(), llvm::MipsSubtarget::isABI_N64(), and llvm::MipsFrameLowering::STI.

void MipsSEFrameLowering::emitEpilogue ( MachineFunction MF,
MachineBasicBlock MBB 
) const [override, virtual]
void MipsSEFrameLowering::emitPrologue ( MachineFunction MF) const [override, virtual]

emitProlog/emitEpilog - These methods insert prolog and epilog code into the function.

Implements llvm::TargetFrameLowering.

Definition at line 409 of file MipsSEFrameLowering.cpp.

References llvm::MachineModuleInfo::addFrameInst(), llvm::MachineBasicBlock::addLiveIn(), llvm::MachineInstrBuilder::addReg(), llvm::MachineFrameInfo::adjustsStack(), llvm::MachineBasicBlock::begin(), llvm::BuildMI(), llvm::MipsFunctionInfo::callsEhReturn(), llvm::TargetOpcode::CFI_INSTRUCTION, contains(), llvm::MCCFIInstruction::createDefCfaOffset(), llvm::MCCFIInstruction::createDefCfaRegister(), llvm::MCCFIInstruction::createOffset(), ehDataReg(), llvm::MachineBasicBlock::end(), llvm::MachineInstr::FrameSetup, llvm::MachineFunction::front(), llvm::DebugLoc::get(), llvm::MachineFrameInfo::getCalleeSavedInfo(), llvm::MachineModuleInfo::getContext(), llvm::MCRegisterInfo::getDwarfRegNum(), llvm::MipsFunctionInfo::getEhDataRegFI(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getInfo(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::MachineFunction::getMMI(), llvm::MachineFrameInfo::getObjectOffset(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MCContext::getRegisterInfo(), llvm::MachineFrameInfo::getStackSize(), llvm::MachineFunction::getSubtarget(), llvm::MipsFrameLowering::hasFP(), I, llvm::MipsSubtarget::isABI_N64(), llvm::MipsSubtarget::isLittle(), llvm::MachineBasicBlock::isLiveIn(), llvm::MachineInstrBuilder::setMIFlag(), llvm::MipsFrameLowering::STI, and std::swap().

hasReservedCallFrame - Under normal circumstances, when a frame pointer is not required, we reserve argument space for call sites in the function immediately on entry to the current function. This eliminates the need for add/sub sp brackets around call sites. Returns true if the call frame is included as part of the stack frame.

Reimplemented from llvm::TargetFrameLowering.

Definition at line 630 of file MipsSEFrameLowering.cpp.

References llvm::MachineFunction::getFrameInfo(), llvm::MachineFrameInfo::getMaxCallFrameSize(), llvm::TargetFrameLowering::getStackAlignment(), llvm::MachineFrameInfo::hasVarSizedObjects(), and llvm::isInt< 16 >().

Referenced by eliminateCallFramePseudoInstr().

void MipsSEFrameLowering::processFunctionBeforeCalleeSavedScan ( MachineFunction MF,
RegScavenger RS 
) 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 599 of file MipsSEFrameLowering.cpp.

References llvm::MachineBasicBlock::addLiveIn(), llvm::MachineFunction::begin(), llvm::MachineFunction::getFrameInfo(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::TargetRegisterInfo::getMinimalPhysRegClass(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getSubtarget(), llvm::MachineFrameInfo::isReturnAddressTaken(), and llvm::TargetInstrInfo::storeRegToStackSlot().


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