Revert "[AVR] Enable the frame pointer for all functions"

This reverts commit 358ad02d999e88853d2cfc954bd2f668308a51f7.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302014 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dylan McKay 2017-05-03 11:36:42 +00:00
parent ddc58c4e34
commit 8ec2e3efa4

View File

@ -228,9 +228,8 @@ void AVRFrameLowering::emitEpilogue(MachineFunction &MF,
bool AVRFrameLowering::hasFP(const MachineFunction &MF) const {
const AVRMachineFunctionInfo *FuncInfo = MF.getInfo<AVRMachineFunctionInfo>();
// TODO: We do not always need a frame pointer.
// This can be optimised.
return true;
return (FuncInfo->getHasSpills() || FuncInfo->getHasAllocas() ||
FuncInfo->getHasStackArgs());
}
bool AVRFrameLowering::spillCalleeSavedRegisters(