[llvm-commits] CVS: llvm/lib/Target/SparcV9/SparcV9FrameInfo.cpp SparcV9FrameInfo.h
Chris Lattner
lattner at cs.uiuc.edu
Thu Aug 12 11:37:06 PDT 2004
Changes in directory llvm/lib/Target/SparcV9:
SparcV9FrameInfo.cpp updated: 1.4 -> 1.5
SparcV9FrameInfo.h updated: 1.7 -> 1.8
---
Log message:
Remove dead methods
---
Diffs of the changes: (+7 -46)
Index: llvm/lib/Target/SparcV9/SparcV9FrameInfo.cpp
diff -u llvm/lib/Target/SparcV9/SparcV9FrameInfo.cpp:1.4 llvm/lib/Target/SparcV9/SparcV9FrameInfo.cpp:1.5
--- llvm/lib/Target/SparcV9/SparcV9FrameInfo.cpp:1.4 Thu Aug 12 13:20:41 2004
+++ llvm/lib/Target/SparcV9/SparcV9FrameInfo.cpp Thu Aug 12 13:36:53 2004
@@ -19,12 +19,6 @@
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
{
// ensure no more auto vars are added
Index: llvm/lib/Target/SparcV9/SparcV9FrameInfo.h
diff -u llvm/lib/Target/SparcV9/SparcV9FrameInfo.h:1.7 llvm/lib/Target/SparcV9/SparcV9FrameInfo.h:1.8
--- llvm/lib/Target/SparcV9/SparcV9FrameInfo.h:1.7 Thu Aug 12 12:58:05 2004
+++ llvm/lib/Target/SparcV9/SparcV9FrameInfo.h Thu Aug 12 13:36:53 2004
@@ -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 @@
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 @@
// 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 @@
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;
More information about the llvm-commits
mailing list