mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-26 22:19:02 +00:00
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
This commit is contained in:
@@ -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::
|
||||
|
||||
Reference in New Issue
Block a user