[llvm-commits] [llvm] r132065 - in /llvm/trunk/lib/Target/Mips: MipsFrameLowering.cpp MipsISelLowering.cpp MipsMachineFunction.h
Akira Hatanaka
ahatanak at gmail.com
Wed May 25 10:52:48 PDT 2011
Author: ahatanak
Date: Wed May 25 12:52:48 2011
New Revision: 132065
URL: http://llvm.org/viewvc/llvm-project?rev=132065&view=rev
Log:
Change initial value of MaxCallFrameSize. MipsFI::getMaxCallFrameSize() should
return 0 if there are no function calls made.
Modified:
llvm/trunk/lib/Target/Mips/MipsFrameLowering.cpp
llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp
llvm/trunk/lib/Target/Mips/MipsMachineFunction.h
Modified: llvm/trunk/lib/Target/Mips/MipsFrameLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsFrameLowering.cpp?rev=132065&r1=132064&r2=132065&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsFrameLowering.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsFrameLowering.cpp Wed May 25 12:52:48 2011
@@ -154,7 +154,7 @@
unsigned StackAlign = getStackAlignment();
unsigned LocalVarAreaOffset = MipsFI->needGPSaveRestore() ?
(MFI->getObjectOffset(MipsFI->getGPFI()) + RegSize) :
- MFI->getMaxCallFrameSize();
+ MipsFI->getMaxCallFrameSize();
unsigned StackSize = AlignOffset(LocalVarAreaOffset, StackAlign) +
AlignOffset(MFI->getStackSize(), StackAlign);
Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp?rev=132065&r1=132064&r2=132065&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Wed May 25 12:52:48 2011
@@ -1322,7 +1322,7 @@
if (IsPIC) {
// Function can have an arbitrary number of calls, so
// hold the LastArgStackLoc with the biggest offset.
- int MaxCallFrameSize = MipsFI->getMaxCallFrameSize();
+ unsigned MaxCallFrameSize = MipsFI->getMaxCallFrameSize();
unsigned NextStackOffset = CCInfo.getNextStackOffset();
// For O32, a minimum of four words (16 bytes) of argument space is
@@ -1330,7 +1330,7 @@
if (Subtarget->isABI_O32())
NextStackOffset = std::max(NextStackOffset, (unsigned)16);
- if (MaxCallFrameSize < (int)NextStackOffset) {
+ if (MaxCallFrameSize < NextStackOffset) {
MipsFI->setMaxCallFrameSize(NextStackOffset);
// $gp restore slot must be aligned.
Modified: llvm/trunk/lib/Target/Mips/MipsMachineFunction.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsMachineFunction.h?rev=132065&r1=132064&r2=132065&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsMachineFunction.h (original)
+++ llvm/trunk/lib/Target/Mips/MipsMachineFunction.h Wed May 25 12:52:48 2011
@@ -48,13 +48,13 @@
std::pair<int, int> InArgFIRange, OutArgFIRange;
int GPFI; // Index of the frame object for restoring $gp
bool HasCall; // True if function has a function call.
- int MaxCallFrameSize;
+ unsigned MaxCallFrameSize;
public:
MipsFunctionInfo(MachineFunction& MF)
: SRetReturnReg(0), GlobalBaseReg(0),
VarArgsFrameIndex(0), InArgFIRange(std::make_pair(-1, 0)),
OutArgFIRange(std::make_pair(-1, 0)), GPFI(0), HasCall(false),
- MaxCallFrameSize(-1)
+ MaxCallFrameSize(0)
{}
bool isInArgFI(int FI) const {
@@ -89,8 +89,8 @@
bool hasCall() const { return HasCall; }
void setHasCall() { HasCall = true; }
- int getMaxCallFrameSize() const { return MaxCallFrameSize; }
- void setMaxCallFrameSize(int S) { MaxCallFrameSize = S; }
+ unsigned getMaxCallFrameSize() const { return MaxCallFrameSize; }
+ void setMaxCallFrameSize(unsigned S) { MaxCallFrameSize = S; }
};
} // end of namespace llvm
More information about the llvm-commits
mailing list