Use MachineFrameInfo::hasCalls instead of MipsFunctionInfo::hasCall to check if
a function has any function calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132140 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/Mips/MipsFrameLowering.cpp b/lib/Target/Mips/MipsFrameLowering.cpp
index 45a1e71..3b7e051 100644
--- a/lib/Target/Mips/MipsFrameLowering.cpp
+++ b/lib/Target/Mips/MipsFrameLowering.cpp
@@ -279,7 +279,6 @@
processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
RegScavenger *RS) const {
MachineRegisterInfo& MRI = MF.getRegInfo();
- MipsFunctionInfo *MipsFI = MF.getInfo<MipsFunctionInfo>();
// FIXME: remove this code if register allocator can correctly mark
// $fp and $ra used or unused.
@@ -293,7 +292,7 @@
// instructions to save/restore $ra unless there is a function call.
// To correct this, $ra is explicitly marked unused if there is no
// function call.
- if (MipsFI->hasCall())
+ if (MF.getFrameInfo()->hasCalls())
MRI.setPhysRegUsed(Mips::RA);
else
MRI.setPhysRegUnused(Mips::RA);