summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MipsRegisterInfo.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
commit0eecf5d201358ac82a1effe19dc838cc9e086d9f (patch)
treeeefb16517be24fc9a176db39cb560827df68b01e /llvm/lib/Target/Mips/MipsRegisterInfo.cpp
parentc92331b9849845e64140ecbd0508e8db6c3dc1e1 (diff)
downloadbcm5719-llvm-0eecf5d201358ac82a1effe19dc838cc9e086d9f.tar.gz
bcm5719-llvm-0eecf5d201358ac82a1effe19dc838cc9e086d9f.zip
Move hasFP() and few related hooks to TargetFrameInfo.
llvm-svn: 119740
Diffstat (limited to 'llvm/lib/Target/Mips/MipsRegisterInfo.cpp')
-rw-r--r--llvm/lib/Target/Mips/MipsRegisterInfo.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/llvm/lib/Target/Mips/MipsRegisterInfo.cpp b/llvm/lib/Target/Mips/MipsRegisterInfo.cpp
index fd221c4a3fd..3612f3625fb 100644
--- a/llvm/lib/Target/Mips/MipsRegisterInfo.cpp
+++ b/llvm/lib/Target/Mips/MipsRegisterInfo.cpp
@@ -117,8 +117,7 @@ getCalleeSavedRegs(const MachineFunction *MF) const
}
BitVector MipsRegisterInfo::
-getReservedRegs(const MachineFunction &MF) const
-{
+getReservedRegs(const MachineFunction &MF) const {
BitVector Reserved(getNumRegs());
Reserved.set(Mips::ZERO);
Reserved.set(Mips::AT);
@@ -137,15 +136,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 MipsRegisterInfo::
-hasFP(const MachineFunction &MF) const {
- const MachineFrameInfo *MFI = MF.getFrameInfo();
- return DisableFramePointerElim(MF) || MFI->hasVarSizedObjects();
-}
-
// This function eliminate ADJCALLSTACKDOWN,
// ADJCALLSTACKUP pseudo instructions
void MipsRegisterInfo::
@@ -209,7 +199,9 @@ getRARegister() const {
unsigned MipsRegisterInfo::
getFrameRegister(const MachineFunction &MF) const {
- return hasFP(MF) ? Mips::FP : Mips::SP;
+ const TargetFrameInfo *TFI = MF.getTarget().getFrameInfo();
+
+ return TFI->hasFP(MF) ? Mips::FP : Mips::SP;
}
unsigned MipsRegisterInfo::
OpenPOWER on IntegriCloud