diff options
Diffstat (limited to 'lib/Target/AVR/AVRFrameLowering.cpp')
-rw-r--r-- | lib/Target/AVR/AVRFrameLowering.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Target/AVR/AVRFrameLowering.cpp b/lib/Target/AVR/AVRFrameLowering.cpp index 25232d2e47e1..c297865db820 100644 --- a/lib/Target/AVR/AVRFrameLowering.cpp +++ b/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<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( |