summaryrefslogtreecommitdiff
path: root/lib/Target/Mips/Mips16RegisterInfo.cpp
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2012-07-31 23:52:55 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2012-07-31 23:52:55 +0000
commit71746220d3d1c3e8efba35038ac2ff14b4a4d3ae (patch)
tree81731141188a20b620b74a7e1fb6dc16c86f0859 /lib/Target/Mips/Mips16RegisterInfo.cpp
parent8589010e3d1d5a902992a5039cffa9d4116982c5 (diff)
downloadllvm-71746220d3d1c3e8efba35038ac2ff14b4a4d3ae.tar.gz
llvm-71746220d3d1c3e8efba35038ac2ff14b4a4d3ae.tar.bz2
llvm-71746220d3d1c3e8efba35038ac2ff14b4a4d3ae.tar.xz
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
Diffstat (limited to 'lib/Target/Mips/Mips16RegisterInfo.cpp')
-rw-r--r--lib/Target/Mips/Mips16RegisterInfo.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Target/Mips/Mips16RegisterInfo.cpp b/lib/Target/Mips/Mips16RegisterInfo.cpp
index a333d79ed9..e0c4971f9d 100644
--- a/lib/Target/Mips/Mips16RegisterInfo.cpp
+++ b/lib/Target/Mips/Mips16RegisterInfo.cpp
@@ -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,