Blackfin always uses a reserved call frame.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 3 Jun 2011 22:45:18 +0000 (22:45 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 3 Jun 2011 22:45:18 +0000 (22:45 +0000)
Materializing the stack pointer update before a call requires a scratch
register that may not be available.

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

lib/Target/Blackfin/BlackfinFrameLowering.cpp
lib/Target/Blackfin/BlackfinFrameLowering.h
lib/Target/Blackfin/BlackfinRegisterInfo.h

index 08bb9522b7c393e66d8ae4c38da58e67b8304788..0b0984d2f7774f8809525f64dcbcf117a3c81ed1 100644 (file)
@@ -31,6 +31,12 @@ bool BlackfinFrameLowering::hasFP(const MachineFunction &MF) const {
     MFI->adjustsStack() || MFI->hasVarSizedObjects();
 }
 
+// Always reserve a call frame. We dont have enough registers to adjust SP.
+bool BlackfinFrameLowering::
+hasReservedCallFrame(const MachineFunction &MF) const {
+  return true;
+}
+
 // Emit a prologue that sets up a stack frame.
 // On function entry, R0-R2 and P0 may hold arguments.
 // R3, P1, and P2 may be used as scratch registers
index 3d2ee251d3bd6830ea4491387b8602e835d167f2..726fa2c063f7b56795dc7934320a453c41f76754 100644 (file)
@@ -36,6 +36,7 @@ public:
   void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
 
   bool hasFP(const MachineFunction &MF) const;
+  bool hasReservedCallFrame(const MachineFunction &MF) const;
 
   void processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
                                             RegScavenger *RS) const;
index dc4a69921b5c191d2c69aa60609d9e4835d43836..375d277216c227747d2b34106da4df545be42210 100644 (file)
@@ -41,8 +41,6 @@ namespace llvm {
       return &BF::PRegClass;
     }
 
-    // bool hasReservedCallFrame(MachineFunction &MF) const;
-
     bool requiresRegisterScavenging(const MachineFunction &MF) const;
 
     void eliminateCallFramePseudoInstr(MachineFunction &MF,