From: Dylan McKay Date: Wed, 3 May 2017 11:36:42 +0000 (+0000) Subject: Revert "[AVR] Enable the frame pointer for all functions" X-Git-Tag: llvmorg-5.0.0-rc1~6088 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c30d85bd8aad17f1235904a00b27181a7e29a952;p=platform%2Fupstream%2Fllvm.git Revert "[AVR] Enable the frame pointer for all functions" This reverts commit 358ad02d999e88853d2cfc954bd2f668308a51f7. llvm-svn: 302014 --- diff --git a/llvm/lib/Target/AVR/AVRFrameLowering.cpp b/llvm/lib/Target/AVR/AVRFrameLowering.cpp index 25232d2..c297865 100644 --- a/llvm/lib/Target/AVR/AVRFrameLowering.cpp +++ b/llvm/lib/Target/AVR/AVRFrameLowering.cpp @@ -228,9 +228,8 @@ void AVRFrameLowering::emitEpilogue(MachineFunction &MF, bool AVRFrameLowering::hasFP(const MachineFunction &MF) const { const AVRMachineFunctionInfo *FuncInfo = MF.getInfo(); - // 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(