diff options
author | Eli Bendersky <eliben@google.com> | 2013-02-21 20:05:00 +0000 |
---|---|---|
committer | Eli Bendersky <eliben@google.com> | 2013-02-21 20:05:00 +0000 |
commit | 700ed80d3da5e98e05ceb90e9bfb66058581a6db (patch) | |
tree | 9e56e69a7368d120c5de167f978f3b37cc310815 /lib/Target/Mips/MipsSERegisterInfo.cpp | |
parent | fece442c697eb29f14b4718bdafa3a97d545b476 (diff) | |
download | llvm-700ed80d3da5e98e05ceb90e9bfb66058581a6db.tar.gz llvm-700ed80d3da5e98e05ceb90e9bfb66058581a6db.tar.bz2 llvm-700ed80d3da5e98e05ceb90e9bfb66058581a6db.tar.xz |
Move the eliminateCallFramePseudoInstr method from TargetRegisterInfo
to TargetFrameLowering, where it belongs. Incidentally, this allows us
to delete some duplicated (and slightly different!) code in TRI.
There are potentially other layering problems that can be cleaned up
as a result, or in a similar manner.
The refactoring was OK'd by Anton Korobeynikov on llvmdev.
Note: this touches the target interfaces, so out-of-tree targets may
be affected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175788 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsSERegisterInfo.cpp')
-rw-r--r-- | lib/Target/Mips/MipsSERegisterInfo.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/lib/Target/Mips/MipsSERegisterInfo.cpp b/lib/Target/Mips/MipsSERegisterInfo.cpp index 0c0a1a3d39..a39b393e4e 100644 --- a/lib/Target/Mips/MipsSERegisterInfo.cpp +++ b/lib/Target/Mips/MipsSERegisterInfo.cpp @@ -54,28 +54,6 @@ requiresFrameIndexScavenging(const MachineFunction &MF) const { return true; } -// This function eliminate ADJCALLSTACKDOWN, -// ADJCALLSTACKUP pseudo instructions -void MipsSERegisterInfo:: -eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, - MachineBasicBlock::iterator I) const { - const TargetFrameLowering *TFI = MF.getTarget().getFrameLowering(); - - if (!TFI->hasReservedCallFrame(MF)) { - int64_t Amount = I->getOperand(0).getImm(); - - if (I->getOpcode() == Mips::ADJCALLSTACKDOWN) - Amount = -Amount; - - const MipsSEInstrInfo *II = static_cast<const MipsSEInstrInfo*>(&TII); - unsigned SP = Subtarget.isABI_N64() ? Mips::SP_64 : Mips::SP; - - II->adjustStackPtr(SP, Amount, MBB, I); - } - - MBB.erase(I); -} - void MipsSERegisterInfo::eliminateFI(MachineBasicBlock::iterator II, unsigned OpNo, int FrameIndex, uint64_t StackSize, |