summaryrefslogtreecommitdiff
path: root/lib/Target/MBlaze/MBlazeRegisterInfo.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2010-11-18 21:19:35 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2010-11-18 21:19:35 +0000
commitd0c38176690e9602a93a20a43f1bd084564a8116 (patch)
treed4c7a39ff5665d4adb34f193c2256f1c6d033181 /lib/Target/MBlaze/MBlazeRegisterInfo.cpp
parentb9064bb96458ab48a878e1a7e678cada2e22ab7a (diff)
downloadllvm-d0c38176690e9602a93a20a43f1bd084564a8116.tar.gz
llvm-d0c38176690e9602a93a20a43f1bd084564a8116.tar.bz2
llvm-d0c38176690e9602a93a20a43f1bd084564a8116.tar.xz
Move hasFP() and few related hooks to TargetFrameInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119740 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/MBlaze/MBlazeRegisterInfo.cpp')
-rw-r--r--lib/Target/MBlaze/MBlazeRegisterInfo.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/Target/MBlaze/MBlazeRegisterInfo.cpp b/lib/Target/MBlaze/MBlazeRegisterInfo.cpp
index 37a30c7300..f74eea708b 100644
--- a/lib/Target/MBlaze/MBlazeRegisterInfo.cpp
+++ b/lib/Target/MBlaze/MBlazeRegisterInfo.cpp
@@ -164,14 +164,6 @@ getReservedRegs(const MachineFunction &MF) const {
return Reserved;
}
-// hasFP - Return true if the specified function should have a dedicated frame
-// pointer register. This is true if the function has variable sized allocas or
-// if frame pointer elimination is disabled.
-bool MBlazeRegisterInfo::hasFP(const MachineFunction &MF) const {
- const MachineFrameInfo *MFI = MF.getFrameInfo();
- return DisableFramePointerElim(MF) || MFI->hasVarSizedObjects();
-}
-
// This function eliminate ADJCALLSTACKDOWN,
// ADJCALLSTACKUP pseudo instructions
void MBlazeRegisterInfo::
@@ -235,7 +227,9 @@ unsigned MBlazeRegisterInfo::getRARegister() const {
}
unsigned MBlazeRegisterInfo::getFrameRegister(const MachineFunction &MF) const {
- return hasFP(MF) ? MBlaze::R19 : MBlaze::R1;
+ const TargetFrameInfo *TFI = MF.getTarget().getFrameInfo();
+
+ return TFI->hasFP(MF) ? MBlaze::R19 : MBlaze::R1;
}
unsigned MBlazeRegisterInfo::getEHExceptionRegister() const {