[llvm] r283639 - [AVR] Don't worry about call frame size when initializing frame pointer

Dylan McKay via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 7 18:10:32 PDT 2016


Author: dylanmckay
Date: Fri Oct  7 20:10:31 2016
New Revision: 283639

URL: http://llvm.org/viewvc/llvm-project?rev=283639&view=rev
Log:
[AVR] Don't worry about call frame size when initializing frame pointer

We previously only used the frame pointer if the frame pointer was too
big. This was to work around a bug (described in this old commit)

https://sourceforge.net/p/avr-llvm/code/204/tree//llvm/trunk/AVR/AVRFrameLowering.cpp?diff=50d64d912718465cb887d17a:203

I mistakenly invered the condition assuming it was a typo. I am now
removing it because it doesn't seem to be a problem anymore (plus it's a
dirty hack).

Modified:
    llvm/trunk/lib/Target/AVR/AVRFrameLowering.cpp

Modified: llvm/trunk/lib/Target/AVR/AVRFrameLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AVR/AVRFrameLowering.cpp?rev=283639&r1=283638&r2=283639&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AVR/AVRFrameLowering.cpp (original)
+++ llvm/trunk/lib/Target/AVR/AVRFrameLowering.cpp Fri Oct  7 20:10:31 2016
@@ -45,10 +45,9 @@ bool AVRFrameLowering::hasReservedCallFr
   // conditions:
   // - Y pointer is reserved to be the frame pointer.
   // - The function does not contain variable sized objects.
-  // - MaxCallFrameSize doesn't fit into 6-bits (when it's greater than 63).
+
   const MachineFrameInfo &MFI = MF.getFrameInfo();
-  return (hasFP(MF) && !MFI.hasVarSizedObjects() &&
-          !isUInt<6>(MFI.getMaxCallFrameSize()));
+  return hasFP(MF) && !MFI.hasVarSizedObjects();
 }
 
 void AVRFrameLowering::emitPrologue(MachineFunction &MF,




More information about the llvm-commits mailing list