Implement MipsSERegisterInfo::eliminateCallFramePseudoInstr. The function emits

instructions that decrement and increment the stack pointer before and after a
call when the function does not have a reserved call frame.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161093 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Akira Hatanaka
2012-07-31 23:52:55 +00:00
parent 8589010e3d
commit 71746220d3
9 changed files with 71 additions and 41 deletions

View File

@@ -42,6 +42,15 @@ Mips16RegisterInfo::Mips16RegisterInfo(const MipsSubtarget &ST,
const TargetInstrInfo &TII)
: MipsRegisterInfo(ST, TII) {}
// This function eliminate ADJCALLSTACKDOWN,
// ADJCALLSTACKUP pseudo instructions
void Mips16RegisterInfo::
eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,
MachineBasicBlock::iterator I) const {
// Simply discard ADJCALLSTACKDOWN, ADJCALLSTACKUP instructions.
MBB.erase(I);
}
void Mips16RegisterInfo::eliminateFI(MachineBasicBlock::iterator II,
unsigned OpNo, int FrameIndex,
uint64_t StackSize,