Remove dead methods
authorChris Lattner <sabre@nondot.org>
Thu, 12 Aug 2004 18:37:15 +0000 (18:37 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 12 Aug 2004 18:37:15 +0000 (18:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15698 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetFrameInfo.h
lib/Target/SparcV9/SparcV9FrameInfo.cpp
lib/Target/SparcV9/SparcV9FrameInfo.h
lib/Target/TargetFrameInfo.cpp

index 14a98a0163406ad94819f90b389569a92e15b8e9..a85cd872406801be154e1e75d9ef45d0bb4e2608 100644 (file)
@@ -61,12 +61,6 @@ public:
   // are Sparc specific.
   //===--------------------------------------------------------------------===//
 
-  virtual int  getStackFrameSizeAlignment       () const;
-  virtual int  getMinStackFrameSize             () const;
-  virtual int  getNumFixedOutgoingArgs          () const;
-  virtual int  getSizeOfEachArgOnStack          () const;
-  virtual bool argsOnStackHaveFixedSize         () const;
-
   // This method adjusts a stack offset to meet alignment rules of target.
   virtual int adjustAlignment(int unalignedOffset, bool growUp,
                              unsigned align) const;
@@ -81,12 +75,6 @@ public:
   virtual int getOutgoingArgOffset              (MachineFunction& mcInfo,
                                                 unsigned argNum) const;
   
-  virtual int getFirstIncomingArgOffset         (MachineFunction& mcInfo,
-                                                bool& growUp) const;
-  virtual int getFirstOutgoingArgOffset         (MachineFunction& mcInfo,
-                                                bool& growUp) const;
-  virtual int getFirstOptionalOutgoingArgOffset (MachineFunction&,
-                                                 bool& growUp) const;
   virtual int getFirstAutomaticVarOffset        (MachineFunction& mcInfo,
                                                  bool& growUp) const;
   virtual int getRegSpillAreaOffset             (MachineFunction& mcInfo,
index 6727aac29af6ce74b777be546aba6c1b199296be..26d92ebb98388e11269aca27b6c7724a624336a9 100644 (file)
 
 using namespace llvm;
 
-int
-SparcV9FrameInfo::getFirstAutomaticVarOffset(MachineFunction&, bool& pos) const {
-  pos = false;                          // static stack area grows downwards
-  return StaticAreaOffsetFromFP;
-}
-
 int
 SparcV9FrameInfo::getRegSpillAreaOffset(MachineFunction& mcInfo, bool& pos) const 
 {
index 9f1e8bc9999157f180053e9c132e60488271ff27..b447777f7a373a733152c9d2e90a8f5a899242c2 100644 (file)
@@ -8,8 +8,6 @@
 //===----------------------------------------------------------------------===//
 //
 // Interface to stack frame layout info for the UltraSPARC.
-// Starting offsets for each area of the stack frame are aligned at
-// a multiple of getStackFrameSizeAlignment().
 //
 //----------------------------------------------------------------------------
 
@@ -28,15 +26,6 @@ public:
   SparcV9FrameInfo(const TargetMachine &TM)
     : TargetFrameInfo(StackGrowsDown, StackFrameSizeAlignment, 0), target(TM) {}
   
-public:
-  // These methods provide constant parameters of the frame layout.
-  // 
-  int  getStackFrameSizeAlignment() const { return StackFrameSizeAlignment;}
-  int  getMinStackFrameSize()       const { return MinStackFrameSize; }
-  int  getNumFixedOutgoingArgs()    const { return NumFixedOutgoingArgs; }
-  int  getSizeOfEachArgOnStack()    const { return SizeOfEachArgOnStack; }
-  bool argsOnStackHaveFixedSize()   const { return true; }
-
   // This method adjusts a stack offset to meet alignment rules of target.
   // The fixed OFFSET (0x7ff) must be subtracted and the result aligned.
   virtual int  adjustAlignment(int unalignedOffset, bool growUp,
@@ -48,45 +37,24 @@ public:
   // particular function.  The frame contents are obtained from the
   // MachineCodeInfoForMethod object for the given function.
   // 
-  int getFirstIncomingArgOffset(MachineFunction& mcInfo, bool& growUp) const {
-    growUp = true;                         // arguments area grows upwards
-    return FirstIncomingArgOffsetFromFP;
-  }
-  int getFirstOutgoingArgOffset(MachineFunction& mcInfo, bool& growUp) const {
-    growUp = true;                         // arguments area grows upwards
-    return FirstOutgoingArgOffsetFromSP;
+  int getFirstAutomaticVarOffset(MachineFunction& mcInfo, bool& growUp) const {
+    growUp = false;
+    return StaticAreaOffsetFromFP;
   }
-  int getFirstOptionalOutgoingArgOffset(MachineFunction& mcInfo,
-                                        bool& growUp) const {
-    growUp = true;                         // arguments area grows upwards
-    return FirstOptionalOutgoingArgOffsetFromSP;
-  }
-  
-  int getFirstAutomaticVarOffset(MachineFunction& mcInfo, bool& growUp) const;
   int getRegSpillAreaOffset(MachineFunction& mcInfo, bool& growUp) const;
   int getTmpAreaOffset(MachineFunction& mcInfo, bool& growUp) const;
   int getDynamicAreaOffset(MachineFunction& mcInfo, bool& growUp) const;
 
   virtual int getIncomingArgOffset(MachineFunction& mcInfo, 
                                    unsigned argNum) const {
-    assert(argsOnStackHaveFixedSize()); 
-  
-    unsigned relativeOffset = argNum * getSizeOfEachArgOnStack();
-    bool growUp;                          // do args grow up or down
-    int firstArg = getFirstIncomingArgOffset(mcInfo, growUp);
-    return growUp ? firstArg + relativeOffset : firstArg - relativeOffset; 
+    unsigned relativeOffset = argNum * SizeOfEachArgOnStack;
+    int firstArg = FirstIncomingArgOffsetFromFP;
+    return firstArg + relativeOffset;
   }
 
   virtual int getOutgoingArgOffset(MachineFunction& mcInfo,
                                   unsigned argNum) const {
-    assert(argsOnStackHaveFixedSize()); 
-    //assert(((int) argNum - this->getNumFixedOutgoingArgs())
-    //     <= (int) mcInfo.getInfo()->getMaxOptionalNumArgs());
-    
-    unsigned relativeOffset = argNum * getSizeOfEachArgOnStack();
-    bool growUp;                          // do args grow up or down
-    int firstArg = getFirstOutgoingArgOffset(mcInfo, growUp);
-    return growUp ? firstArg + relativeOffset : firstArg - relativeOffset; 
+    return FirstOutgoingArgOffsetFromSP + argNum * SizeOfEachArgOnStack;
   }
   
   /*----------------------------------------------------------------------
@@ -136,7 +104,6 @@ public:
   static const int OFFSET                                  = (int) 0x7ff;
   static const int StackFrameSizeAlignment                 =  16;
   static const int MinStackFrameSize                       = 176;
-  static const int NumFixedOutgoingArgs                    =   6;
   static const int SizeOfEachArgOnStack                    =   8;
   static const int FirstIncomingArgOffsetFromFP            = 128 + OFFSET;
   static const int FirstOptionalIncomingArgOffsetFromFP    = 176 + OFFSET;
index 51b22196a7fed06048fef8be7af574f97df55461..7a695c8594752d768587a88899134198f10a0f56 100644 (file)
@@ -21,12 +21,6 @@ using namespace llvm;
 // are Sparc specific.
 //===--------------------------------------------------------------------===//
 
-int TargetFrameInfo::getStackFrameSizeAlignment() const { abort(); }
-int TargetFrameInfo::getMinStackFrameSize() const { abort(); }
-int TargetFrameInfo::getNumFixedOutgoingArgs() const { abort(); }
-int TargetFrameInfo::getSizeOfEachArgOnStack() const { abort(); }
-bool TargetFrameInfo::argsOnStackHaveFixedSize() const { abort(); }
-
 // This method adjusts a stack offset to meet alignment rules of target.
 int 
 TargetFrameInfo::adjustAlignment(int unalignedOffset, bool growUp,
@@ -45,18 +39,6 @@ int
 TargetFrameInfo::getOutgoingArgOffset(MachineFunction& mcInfo,
                                       unsigned argNum) const { abort(); }
 
-int
-TargetFrameInfo::getFirstIncomingArgOffset(MachineFunction& mcInfo,
-                                           bool& growUp) const { abort(); }
-
-int
-TargetFrameInfo::getFirstOutgoingArgOffset(MachineFunction& mcInfo,
-                                           bool& growUp) const { abort(); }
-
-int
-TargetFrameInfo::getFirstOptionalOutgoingArgOffset(MachineFunction&,
-                                                bool& growUp) const { abort(); }
-
 int
 TargetFrameInfo::getFirstAutomaticVarOffset(MachineFunction& mcInfo,
                                             bool& growUp) const { abort(); }