Move getInitialFrameState() to TargetFrameInfo
authorAnton Korobeynikov <asl@math.spbu.ru>
Thu, 18 Nov 2010 23:25:52 +0000 (23:25 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Thu, 18 Nov 2010 23:25:52 +0000 (23:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119754 91177308-0d34-0410-b5e6-96231b3b80d8

25 files changed:
include/llvm/Target/TargetFrameInfo.h
include/llvm/Target/TargetRegisterInfo.h
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/CodeGen/AsmPrinter/DwarfException.cpp
lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp
lib/ExecutionEngine/JIT/JITDwarfEmitter.h
lib/Target/CellSPU/SPUFrameInfo.cpp
lib/Target/CellSPU/SPUFrameInfo.h
lib/Target/CellSPU/SPURegisterInfo.cpp
lib/Target/CellSPU/SPURegisterInfo.h
lib/Target/PowerPC/PPCFrameInfo.cpp
lib/Target/PowerPC/PPCFrameInfo.h
lib/Target/PowerPC/PPCRegisterInfo.cpp
lib/Target/PowerPC/PPCRegisterInfo.h
lib/Target/TargetFrameInfo.cpp
lib/Target/TargetRegisterInfo.cpp
lib/Target/X86/X86FrameInfo.cpp
lib/Target/X86/X86FrameInfo.h
lib/Target/X86/X86RegisterInfo.cpp
lib/Target/X86/X86RegisterInfo.h
lib/Target/X86/X86TargetMachine.cpp
lib/Target/XCore/XCoreFrameInfo.cpp
lib/Target/XCore/XCoreFrameInfo.h
lib/Target/XCore/XCoreRegisterInfo.cpp
lib/Target/XCore/XCoreRegisterInfo.h

index d8d0ca1edd06f7d83534f46ffaf6972007407cf9..cffbabb26bf403c53ece3377bf3904bb91d1e4b5 100644 (file)
 #define LLVM_TARGET_TARGETFRAMEINFO_H
 
 #include <utility>
+#include <vector>
 
 namespace llvm {
   class MachineFunction;
   class MachineBasicBlock;
+  class MachineMove;
 
 /// Information about stack frame layout on the target.  It holds the direction
 /// of stack growth, the known stack alignment on entry to each function, and
@@ -131,6 +133,10 @@ public:
     return hasReservedCallFrame(MF) || hasFP(MF);
   }
 
+  /// getInitialFrameState - Returns a list of machine moves that are assumed
+  /// on entry to all functions.  Note that LabelID is ignored (assumed to be
+  /// the beginning of the function.)
+  virtual void getInitialFrameState(std::vector<MachineMove> &Moves) const;
 };
 
 } // End llvm namespace
index 47675c7a44b8125400416da3a161375f3b1d865e..049cf08657ed585a12600b50756f68380ca4954a 100644 (file)
@@ -749,11 +749,6 @@ public:
   /// getRARegister - This method should return the register where the return
   /// address can be found.
   virtual unsigned getRARegister() const = 0;
-
-  /// getInitialFrameState - Returns a list of machine moves that are assumed
-  /// on entry to all functions.  Note that LabelID is ignored (assumed to be
-  /// the beginning of the function.)
-  virtual void getInitialFrameState(std::vector<MachineMove> &Moves) const;
 };
 
 
index 7be2f64003e1052ffc8c128bb99b24c70e03dc64..d19a316a5929f14e2f139346ebca3a32cadd578d 100644 (file)
@@ -3293,10 +3293,11 @@ void DwarfDebug::emitCommonDebugFrame() {
   Asm->EmitSLEB128(stackGrowth, "CIE Data Alignment Factor");
   Asm->OutStreamer.AddComment("CIE RA Column");
   const TargetRegisterInfo *RI = Asm->TM.getRegisterInfo();
+  const TargetFrameInfo *TFI = Asm->TM.getFrameInfo();
   Asm->EmitInt8(RI->getDwarfRegNum(RI->getRARegister(), false));
 
   std::vector<MachineMove> Moves;
-  RI->getInitialFrameState(Moves);
+  TFI->getInitialFrameState(Moves);
 
   Asm->EmitFrameMoves(Moves, 0, false);
 
index 86a368831e0e2762fd11ac8a9abf008b45b94b5a..e3a8cde9aacc2cfe2a960a3367b3b15d1db087e5 100644 (file)
@@ -127,6 +127,7 @@ void DwarfException::EmitCIE(const Function *PersonalityFn, unsigned Index) {
   Asm->OutStreamer.AddComment("CIE Return Address Column");
 
   const TargetRegisterInfo *RI = Asm->TM.getRegisterInfo();
+  const TargetFrameInfo *TFI = Asm->TM.getFrameInfo();
   Asm->EmitInt8(RI->getDwarfRegNum(RI->getRARegister(), true));
 
   if (Augmentation[0]) {
@@ -146,7 +147,7 @@ void DwarfException::EmitCIE(const Function *PersonalityFn, unsigned Index) {
 
   // Indicate locations of general callee saved registers in frame.
   std::vector<MachineMove> Moves;
-  RI->getInitialFrameState(Moves);
+  TFI->getInitialFrameState(Moves);
   Asm->EmitFrameMoves(Moves, 0, true);
 
   // On Darwin the linker honors the alignment of eh_frame, which means it must
index 1105bcc0437f28ad629da733aaecfb0d27050bab..b6662ce95dae9a7d2daf0ef649bac1e4e2056cea 100644 (file)
@@ -45,6 +45,7 @@ unsigned char* JITDwarfEmitter::EmitDwarfTable(MachineFunction& F,
   TD = TM.getTargetData();
   stackGrowthDirection = TM.getFrameInfo()->getStackGrowthDirection();
   RI = TM.getRegisterInfo();
+  TFI = TM.getFrameInfo();
   JCE = &jce;
   
   unsigned char* ExceptionTable = EmitExceptionTable(&F, StartFunction,
@@ -523,7 +524,7 @@ JITDwarfEmitter::EmitCommonEHFrame(const Function* Personality) const {
   }
 
   std::vector<MachineMove> Moves;
-  RI->getInitialFrameState(Moves);
+  TFI->getInitialFrameState(Moves);
   EmitFrameMoves(0, Moves);
 
   JCE->emitAlignmentWithFill(PointerSize, dwarf::DW_CFA_nop);
index 30956820f357ec430121312f285e22b33f036e0f..9db422e0ed570c84510e7ad542de682bbc54ee2c 100644 (file)
@@ -23,6 +23,7 @@ class MachineFunction;
 class MachineModuleInfo;
 class MachineMove;
 class TargetData;
+class TargetFrameInfo;
 class TargetMachine;
 class TargetRegisterInfo;
 
@@ -30,6 +31,7 @@ class JITDwarfEmitter {
   const TargetData* TD;
   JITCodeEmitter* JCE;
   const TargetRegisterInfo* RI;
+  const TargetFrameInfo *TFI;
   MachineModuleInfo* MMI;
   JIT& Jit;
   bool stackGrowthDirection;
index b1a09ad553f070359d86a1f4d38350e123c96d07..114d85848bc7406fc234a0185143e14340a4b5b2 100644 (file)
@@ -248,3 +248,10 @@ void SPUFrameInfo::emitEpilogue(MachineFunction &MF,
     }
   }
 }
+
+void SPUFrameInfo::getInitialFrameState(std::vector<MachineMove> &Moves) const {
+  // Initial state of the frame pointer is R1.
+  MachineLocation Dst(MachineLocation::VirtualFP);
+  MachineLocation Src(SPU::R1, 0);
+  Moves.push_back(MachineMove(0, Dst, Src));
+}
index a705a9fcabecb658999ffd436fe8cec2ba1cb283..f1cb254ed08bff4a8ac36dc33603d1c8cf4d8715 100644 (file)
@@ -40,6 +40,9 @@ namespace llvm {
     //! Prediate: Target has dedicated frame pointer
     bool hasFP(const MachineFunction &MF) const;
 
+    //! Perform target-specific stack frame setup.
+    void getInitialFrameState(std::vector<MachineMove> &Moves) const;
+
     //! Return a function's saved spill slots
     /*!
       For CellSPU, a function's saved spill slots is just the link register.
index f399437e45a078fd6e115c8320a89aa00faa2e6b..405994a8f082fbcbbeee6bee397f07ee7dcd7fa1 100644 (file)
@@ -340,16 +340,6 @@ SPURegisterInfo::getFrameRegister(const MachineFunction &MF) const
   return SPU::R1;
 }
 
-void
-SPURegisterInfo::getInitialFrameState(std::vector<MachineMove> &Moves) const
-{
-  // Initial state of the frame pointer is R1.
-  MachineLocation Dst(MachineLocation::VirtualFP);
-  MachineLocation Src(SPU::R1, 0);
-  Moves.push_back(MachineMove(0, Dst, Src));
-}
-
-
 int
 SPURegisterInfo::getDwarfRegNum(unsigned RegNum, bool isEH) const {
   // FIXME: Most probably dwarf numbers differs for Linux and Darwin
index 70eeaf94b29882d472eabe31e5bc6c060efc87b0..9942fe115ab8f226d0296e1eed60edd4d21b3455 100644 (file)
@@ -71,8 +71,6 @@ namespace llvm {
     unsigned getRARegister() const;
     //! Get the stack frame register (SP, aka R1)
     unsigned getFrameRegister(const MachineFunction &MF) const;
-    //! Perform target-specific stack frame setup.
-    void getInitialFrameState(std::vector<MachineMove> &Moves) const;
 
     //------------------------------------------------------------------------
     // New methods added:
index 453975c26710c800cfb390ae6c7bf77252b4bc19..8fa4bdad6e1fc37ba4b94c727bdc0a0c3d5aa0de 100644 (file)
@@ -689,3 +689,10 @@ void PPCFrameInfo::emitEpilogue(MachineFunction &MF,
     BuildMI(MBB, MBBI, dl, TII.get(PPC::TAILBA8)).addImm(JumpTarget.getImm());
   }
 }
+
+void PPCFrameInfo::getInitialFrameState(std::vector<MachineMove> &Moves) const {
+  // Initial state of the frame pointer is R1.
+  MachineLocation Dst(MachineLocation::VirtualFP);
+  MachineLocation Src(PPC::R1, 0);
+  Moves.push_back(MachineMove(0, Dst, Src));
+}
index aeaa864e0ab6bb3edcafe41f7ce47b9b525ccb84..54448dbdd0d4f30ef6d203ae9044679050c9acdb 100644 (file)
@@ -38,6 +38,7 @@ public:
   void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
 
   bool hasFP(const MachineFunction &MF) const;
+  void getInitialFrameState(std::vector<MachineMove> &Moves) const;
 
   /// targetHandlesStackFrameRounding - Returns true if the target is
   /// responsible for rounding up the stack frame (probably at emitPrologue
index 0459c7f1ee53ea79d72032bf556290490dc31b74..182b65a4ba30e3c3dce20ee4b22465198f55f330 100644 (file)
@@ -943,14 +943,6 @@ unsigned PPCRegisterInfo::getFrameRegister(const MachineFunction &MF) const {
     return TFI->hasFP(MF) ? PPC::X31 : PPC::X1;
 }
 
-void PPCRegisterInfo::getInitialFrameState(std::vector<MachineMove> &Moves)
-                                                                         const {
-  // Initial state of the frame pointer is R1.
-  MachineLocation Dst(MachineLocation::VirtualFP);
-  MachineLocation Src(PPC::R1, 0);
-  Moves.push_back(MachineMove(0, Dst, Src));
-}
-
 unsigned PPCRegisterInfo::getEHExceptionRegister() const {
   return !Subtarget.isPPC64() ? PPC::R3 : PPC::X3;
 }
index 6e7274207774ce9ec6067966c5d1cc2f38be497c..8a9b522b2de4eb0e9b55fee1df452f7ea027aa66 100644 (file)
@@ -66,7 +66,6 @@ public:
   // Debug information queries.
   unsigned getRARegister() const;
   unsigned getFrameRegister(const MachineFunction &MF) const;
-  void getInitialFrameState(std::vector<MachineMove> &Moves) const;
 
   // Exception handling queries.
   unsigned getEHExceptionRegister() const;
index 873d60a1b5ff39a5831eb96c4a17b6b8705983df..ff9b89a6f4a56c143ff77f09e8cd8b6bb210df8a 100644 (file)
@@ -17,3 +17,10 @@ using namespace llvm;
 
 TargetFrameInfo::~TargetFrameInfo() {
 }
+
+/// getInitialFrameState - Returns a list of machine moves that are assumed
+/// on entry to a function.
+void
+TargetFrameInfo::getInitialFrameState(std::vector<MachineMove> &Moves) const {
+  // Default is to do nothing.
+}
index f2434a6224814e4146f427aa528f1b947e087df3..e728a949740ff9dfc144289df3768a180def6909 100644 (file)
@@ -98,13 +98,6 @@ int TargetRegisterInfo::getFrameIndexOffset(const MachineFunction &MF,
     TFI.getOffsetOfLocalArea() + MFI->getOffsetAdjustment();
 }
 
-/// getInitialFrameState - Returns a list of machine moves that are assumed
-/// on entry to a function.
-void
-TargetRegisterInfo::getInitialFrameState(std::vector<MachineMove> &Moves) const{
-  // Default is to do nothing.
-}
-
 const TargetRegisterClass *
 llvm::getCommonSubClass(const TargetRegisterClass *A,
                         const TargetRegisterClass *B) {
index affb6ffbb2d806897288bff401a2f7b61cb3d831..73f3c79a092a46f52bbfd917b6422b20b8aeaf01 100644 (file)
@@ -15,6 +15,7 @@
 #include "X86InstrBuilder.h"
 #include "X86InstrInfo.h"
 #include "X86MachineFunctionInfo.h"
+#include "X86TargetMachine.h"
 #include "llvm/Function.h"
 #include "llvm/CodeGen/MachineFrameInfo.h"
 #include "llvm/CodeGen/MachineFunction.h"
@@ -40,7 +41,7 @@ bool X86FrameInfo::hasReservedCallFrame(const MachineFunction &MF) const {
 bool X86FrameInfo::hasFP(const MachineFunction &MF) const {
   const MachineFrameInfo *MFI = MF.getFrameInfo();
   const MachineModuleInfo &MMI = MF.getMMI();
-  const TargetRegisterInfo *RI = MF.getTarget().getRegisterInfo();
+  const TargetRegisterInfo *RI = TM.getRegisterInfo();
 
   return (DisableFramePointerElim(MF) ||
           RI->needsStackRealignment(MF) ||
@@ -211,12 +212,12 @@ void X86FrameInfo::emitCalleeSavedFrameMoves(MachineFunction &MF,
   if (CSI.empty()) return;
 
   std::vector<MachineMove> &Moves = MMI.getFrameMoves();
-  const TargetData *TD = MF.getTarget().getTargetData();
+  const TargetData *TD = TM.getTargetData();
   bool HasFP = hasFP(MF);
 
   // Calculate amount of bytes used for return address storing.
   int stackGrowth =
-    (MF.getTarget().getFrameInfo()->getStackGrowthDirection() ==
+    (TM.getFrameInfo()->getStackGrowthDirection() ==
      TargetFrameInfo::StackGrowsUp ?
      TD->getPointerSize() : -TD->getPointerSize());
 
@@ -276,11 +277,8 @@ void X86FrameInfo::emitPrologue(MachineFunction &MF) const {
   MachineBasicBlock::iterator MBBI = MBB.begin();
   MachineFrameInfo *MFI = MF.getFrameInfo();
   const Function *Fn = MF.getFunction();
-  const X86Subtarget *Subtarget = &MF.getTarget().getSubtarget<X86Subtarget>();
-  const X86RegisterInfo *RegInfo =
-    static_cast<const X86RegisterInfo*>(MF.getTarget().getRegisterInfo());
-  const X86InstrInfo &TII =
-    *static_cast<const X86InstrInfo*>(MF.getTarget().getInstrInfo());
+  const X86RegisterInfo *RegInfo = TM.getRegisterInfo();
+  const X86InstrInfo &TII = *TM.getInstrInfo();
   MachineModuleInfo &MMI = MF.getMMI();
   X86MachineFunctionInfo *X86FI = MF.getInfo<X86MachineFunctionInfo>();
   bool needsFrameMoves = MMI.hasDebugInfo() ||
@@ -487,13 +485,12 @@ void X86FrameInfo::emitPrologue(MachineFunction &MF) const {
   // responsible for adjusting the stack pointer.  Touching the stack at 4K
   // increments is necessary to ensure that the guard pages used by the OS
   // virtual memory manager are allocated in correct sequence.
-  if (NumBytes >= 4096 &&
-     (Subtarget->isTargetCygMing() || Subtarget->isTargetWin32())) {
+  if (NumBytes >= 4096 && (STI.isTargetCygMing() || STI.isTargetWin32())) {
     // Check whether EAX is livein for this function.
     bool isEAXAlive = isEAXLiveIn(MF);
 
     const char *StackProbeSymbol =
-      Subtarget->isTargetWindows() ? "_chkstk" : "_alloca";
+      STI.isTargetWindows() ? "_chkstk" : "_alloca";
     unsigned CallOp = Is64Bit ? X86::CALL64pcrel32 : X86::CALLpcrel32;
     if (!isEAXAlive) {
       BuildMI(MBB, MBBI, DL, TII.get(X86::MOV32ri), X86::EAX)
@@ -522,7 +519,7 @@ void X86FrameInfo::emitPrologue(MachineFunction &MF) const {
                                       StackPtr, false, NumBytes - 4);
       MBB.insert(MBBI, MI);
     }
-  } else if (NumBytes >= 4096 && Subtarget->isTargetWin64()) {
+  } else if (NumBytes >= 4096 && STI.isTargetWin64()) {
     // Sanity check that EAX is not livein for this function.  It should
     // should not be, so throw an assert.
     assert(!isEAXLiveIn(MF) && "EAX is livein in the Win64 case!");
@@ -568,10 +565,8 @@ void X86FrameInfo::emitEpilogue(MachineFunction &MF,
                                 MachineBasicBlock &MBB) const {
   const MachineFrameInfo *MFI = MF.getFrameInfo();
   X86MachineFunctionInfo *X86FI = MF.getInfo<X86MachineFunctionInfo>();
-  const X86RegisterInfo *RegInfo =
-    static_cast<const X86RegisterInfo*>(MF.getTarget().getRegisterInfo());
-  const X86InstrInfo &TII =
-    *static_cast<const X86InstrInfo*>(MF.getTarget().getInstrInfo());
+  const X86RegisterInfo *RegInfo = TM.getRegisterInfo();
+  const X86InstrInfo &TII = *TM.getInstrInfo();
   MachineBasicBlock::iterator MBBI = prior(MBB.end());
   unsigned RetOpcode = MBBI->getOpcode();
   DebugLoc DL = MBBI->getDebugLoc();
@@ -752,3 +747,20 @@ void X86FrameInfo::emitEpilogue(MachineFunction &MF,
     emitSPUpdate(MBB, MBBI, StackPtr, delta, Is64Bit, TII);
   }
 }
+
+void
+X86FrameInfo::getInitialFrameState(std::vector<MachineMove> &Moves) const {
+  // Calculate amount of bytes used for return address storing
+  int stackGrowth = (STI.is64Bit() ? -8 : -4);
+  const X86RegisterInfo *RI = TM.getRegisterInfo();
+
+  // Initial state of the frame pointer is esp+stackGrowth.
+  MachineLocation Dst(MachineLocation::VirtualFP);
+  MachineLocation Src(RI->getStackRegister(), stackGrowth);
+  Moves.push_back(MachineMove(0, Dst, Src));
+
+  // Add return address to move list
+  MachineLocation CSDst(RI->getStackRegister(), stackGrowth);
+  MachineLocation CSSrc(RI->getRARegister());
+  Moves.push_back(MachineMove(0, CSDst, CSSrc));
+}
index 433d965605cf80379ed7288a484619500874ecb8..0b81d3bdfb93f249bd4f4da7ee49f8fc89c5b514 100644 (file)
 
 namespace llvm {
   class MCSymbol;
+  class X86TargetMachine;
 
 class X86FrameInfo : public TargetFrameInfo {
-protected:
+  const X86TargetMachine &TM;
   const X86Subtarget &STI;
-
 public:
-  explicit X86FrameInfo(const X86Subtarget &sti)
+  explicit X86FrameInfo(const X86TargetMachine &tm, const X86Subtarget &sti)
     : TargetFrameInfo(StackGrowsDown,
                       sti.getStackAlignment(),
                       (sti.isTargetWin64() ? -40 : (sti.is64Bit() ? -8 : -4))),
-      STI(sti) {
+      TM(tm), STI(sti) {
   }
 
   void emitCalleeSavedFrameMoves(MachineFunction &MF, MCSymbol *Label,
@@ -43,6 +43,7 @@ public:
   bool hasFP(const MachineFunction &MF) const;
   bool hasReservedCallFrame(const MachineFunction &MF) const;
 
+  void getInitialFrameState(std::vector<MachineMove> &Moves) const;
 };
 
 } // End llvm namespace
index 5cbbb06f37b53a235fbf1a199d0585e5adc86ff4..da6c94574ca4e857f04137da3e933f466793d165 100644 (file)
@@ -694,22 +694,6 @@ unsigned X86RegisterInfo::getFrameRegister(const MachineFunction &MF) const {
   return TFI->hasFP(MF) ? FramePtr : StackPtr;
 }
 
-void
-X86RegisterInfo::getInitialFrameState(std::vector<MachineMove> &Moves) const {
-  // Calculate amount of bytes used for return address storing
-  int stackGrowth = (Is64Bit ? -8 : -4);
-
-  // Initial state of the frame pointer is esp+stackGrowth.
-  MachineLocation Dst(MachineLocation::VirtualFP);
-  MachineLocation Src(StackPtr, stackGrowth);
-  Moves.push_back(MachineMove(0, Dst, Src));
-
-  // Add return address to move list
-  MachineLocation CSDst(StackPtr, stackGrowth);
-  MachineLocation CSSrc(getRARegister());
-  Moves.push_back(MachineMove(0, CSDst, CSSrc));
-}
-
 unsigned X86RegisterInfo::getEHExceptionRegister() const {
   llvm_unreachable("What is the exception register");
   return 0;
index f543c19584732d1df8684da60f088e0a5295dfd9..e7213b4d2930ce2b1344eec68ad9a5921e5992ea 100644 (file)
@@ -136,7 +136,6 @@ public:
   unsigned getSlotSize() const { return SlotSize; }
 
   int getFrameIndexOffset(const MachineFunction &MF, int FI) const;
-  void getInitialFrameState(std::vector<MachineMove> &Moves) const;
 
   // Exception handling queries.
   unsigned getEHExceptionRegister() const;
index 4c01e60f28e032e5634f46fc87660f67879d2e59..c3b236aae2e0496f848f3ec21470328fcf8c7636 100644 (file)
@@ -117,9 +117,9 @@ X86_64TargetMachine::X86_64TargetMachine(const Target &T, const std::string &TT,
 ///
 X86TargetMachine::X86TargetMachine(const Target &T, const std::string &TT, 
                                    const std::string &FS, bool is64Bit)
-  : LLVMTargetMachine(T, TT), 
+  : LLVMTargetMachine(T, TT),
     Subtarget(TT, FS, is64Bit),
-    FrameInfo(Subtarget),
+    FrameInfo(*this, Subtarget),
     ELFWriterInfo(is64Bit, true) {
   DefRelocModel = getRelocationModel();
 
index ae86c954cd021ea10ea2c7af25f6f494d78c78ff..5359abb98c93e2c225c4e58ae9c7f613b9f14e71 100644 (file)
@@ -263,3 +263,11 @@ void XCoreFrameInfo::emitEpilogue(MachineFunction &MF,
     }
   }
 }
+
+void XCoreFrameInfo::getInitialFrameState(std::vector<MachineMove> &Moves)
+                                                                        const {
+  // Initial state of the frame pointer is SP.
+  MachineLocation Dst(MachineLocation::VirtualFP);
+  MachineLocation Src(XCore::SP, 0);
+  Moves.push_back(MachineMove(0, Dst, Src));
+}
index 76960a75df6e2112f87f51e2ed3d13745272f303..86ca791914523f07cc2df8498960754a46d17e23 100644 (file)
@@ -33,6 +33,8 @@ namespace llvm {
 
     bool hasFP(const MachineFunction &MF) const;
 
+    void getInitialFrameState(std::vector<MachineMove> &Moves) const;
+
     //! Stack slot size (4 bytes)
     static int stackSlotSize() {
       return 4;
index 381e9ab2eb84f59e54688727a85197800fd7f8ab..1ee3c59c0390d84b7323543b5ae42c7d694eef4c 100644 (file)
@@ -364,13 +364,5 @@ unsigned XCoreRegisterInfo::getRARegister() const {
   return XCore::LR;
 }
 
-void XCoreRegisterInfo::getInitialFrameState(std::vector<MachineMove> &Moves)
-                                                                         const {
-  // Initial state of the frame pointer is SP.
-  MachineLocation Dst(MachineLocation::VirtualFP);
-  MachineLocation Src(XCore::SP, 0);
-  Moves.push_back(MachineMove(0, Dst, Src));
-}
-
 #include "XCoreGenRegisterInfo.inc"
 
index 047fc27cfa9512f492f0ed6475a8355250b583eb..3d21282a162e4638984edd90d9ece98277e4d649 100644 (file)
@@ -63,7 +63,6 @@ public:
   // Debug information queries.
   unsigned getRARegister() const;
   unsigned getFrameRegister(const MachineFunction &MF) const;
-  void getInitialFrameState(std::vector<MachineMove> &Moves) const;
 
   //! Return the array of argument passing registers
   /*!