OpenASIP
2.0
|
#include <TCEFrameInfo.hh>
Public Member Functions | |
TCEFrameLowering (TCERegisterInfo *tri, const TCEInstrInfo *tii, int stackAlignment) | |
MachineBasicBlock::iterator | eliminateCallFramePseudoInstr (MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const override |
void | emitPrologue (MachineFunction &mf, MachineBasicBlock &MBB) const override |
void | emitEpilogue (MachineFunction &mf, MachineBasicBlock &MBB) const override |
bool | hasFP (const MachineFunction &MF) const override |
int | stackAlignment () const |
bool | containsCall (const MachineFunction &mf) const |
Private Attributes | |
int | stackAlignment_ |
const TCERegisterInfo * | tri_ |
const TCEInstrInfo & | tii_ |
!! Important !! ************* ON EVERY LLVM UPDATE CHECK THESE INTERFACES VERY CAREFULLY FROM include/llvm/Target/TargetFrameInfo.h
Compiler doesn warn or give error if parameter lists are changed. Many times also base class implementation works, but does not do very good job.
Definition at line 60 of file TCEFrameInfo.hh.
|
inline |
!! Important !! ************* If the last boolean parameter of the constructor is set to false, stack realignment is not allowed. This means, that every stack object having a bigger alignment than the stack's own alignment, will be reduced to have the stack's alignment.
For example, if stack realignment parameter is set to false, and stack has alignment of 4, and v4i32 vector has alignment of 16 (bytes) -> vector's alignment in stack will be demoted to 4.
Definition at line 73 of file TCEFrameInfo.hh.
References llvm::TCERegisterInfo::setTFI().
bool TCEFrameLowering::containsCall | ( | const MachineFunction & | mf | ) | const |
Definition at line 146 of file TCEFrameInfo.cc.
References TCEISD::CALL.
Referenced by llvm::TCERegisterInfo::eliminateFrameIndex(), emitEpilogue(), emitPrologue(), and llvm::TCERegisterInfo::getReservedRegs().
|
override |
Eliminates call frame pseudo instructions.
Stack space is already reserved in caller stack.
Definition at line 85 of file TCEFrameInfo.cc.
References ADDIMM, ERASE_INSTR_AND_RETURN, llvm::TCEInstrInfo::getPointerAdjustment(), hasFP(), and tii_.
|
override |
Emits machine function epilogue to machine functions.
Definition at line 266 of file TCEFrameInfo.cc.
References ADDIMM, assert, containsCall(), hasFP(), LDRA, LDREG, MOVREG, RA, stackAlignment_, and tii_.
|
override |
Emits machine function prologue to machine functions.
Definition at line 166 of file TCEFrameInfo.cc.
References containsCall(), llvm::TCEInstrInfo::getPointerAdjustment(), hasFP(), MOVREG, RA, stackAlignment_, STRA, STREG, and tii_.
|
override |
Definition at line 138 of file TCEFrameInfo.cc.
Referenced by eliminateCallFramePseudoInstr(), llvm::TCERegisterInfo::eliminateFrameIndex(), emitEpilogue(), emitPrologue(), and llvm::TCERegisterInfo::hasFP().
|
inline |
Definition at line 95 of file TCEFrameInfo.hh.
References stackAlignment_.
Referenced by llvm::TCERegisterInfo::eliminateFrameIndex().
|
private |
Definition at line 98 of file TCEFrameInfo.hh.
Referenced by emitEpilogue(), emitPrologue(), and stackAlignment().
|
private |
Definition at line 100 of file TCEFrameInfo.hh.
Referenced by eliminateCallFramePseudoInstr(), emitEpilogue(), and emitPrologue().
|
private |
Definition at line 99 of file TCEFrameInfo.hh.