LLVM API Documentation

Public Member Functions
llvm::Mips16FrameLowering Class Reference

#include <Mips16FrameLowering.h>

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

List of all members.

Public Member Functions

 Mips16FrameLowering (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 restoreCalleeSavedRegisters (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

Detailed Description

Definition at line 20 of file Mips16FrameLowering.h.


Constructor & Destructor Documentation

Definition at line 32 of file Mips16FrameLowering.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 148 of file Mips16FrameLowering.cpp.

References llvm::Mips16InstrInfo::adjustStackPtr(), llvm::MachineBasicBlock::erase(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::MachineFunction::getSubtarget(), hasReservedCallFrame(), and TII.

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

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 166 of file Mips16FrameLowering.cpp.

References llvm::MachineFunction::getFrameInfo(), llvm::MachineFrameInfo::getMaxCallFrameSize(), and llvm::MachineFrameInfo::hasVarSizedObjects().

Referenced by eliminateCallFramePseudoInstr().

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

References llvm::TargetSubtargetInfo::getInstrInfo(), llvm::MachineFunction::getRegInfo(), llvm::Mips16InstrInfo::getRegisterInfo(), llvm::MipsRegisterInfo::getReservedRegs(), llvm::MachineFunction::getSubtarget(), llvm::MipsFrameLowering::hasFP(), llvm::MachineRegisterInfo::setPhysRegUsed(), and TII.

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 132 of file Mips16FrameLowering.cpp.

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 104 of file Mips16FrameLowering.cpp.

References llvm::MachineBasicBlock::addLiveIn(), llvm::MachineFunction::begin(), llvm::MachineFunction::getFrameInfo(), llvm::MachineBasicBlock::getParent(), and llvm::MachineFrameInfo::isReturnAddressTaken().


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