mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
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:
@ -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);
|
||||
|
Reference in New Issue
Block a user