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
This commit is contained in:
Akira Hatanaka
2011-05-26 20:30:31 +00:00
parent a5e62019d7
commit 33458fedb6
3 changed files with 2 additions and 10 deletions

View File

@ -279,7 +279,6 @@ void MipsFrameLowering::
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 @@ processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
// 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);