]> granicus.if.org Git - llvm/commitdiff
[AVR] Enable the frame pointer for all functions
authorDylan McKay <me@dylanmckay.io>
Mon, 1 May 2017 23:16:59 +0000 (23:16 +0000)
committerDylan McKay <me@dylanmckay.io>
Mon, 1 May 2017 23:16:59 +0000 (23:16 +0000)
This is a temporary measure while we figure out a way to get the frame
pointer working correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301881 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AVR/AVRFrameLowering.cpp

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