[llvm-commits] [llvm] r132070 - /llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp

Akira Hatanaka ahatanak at gmail.com
Wed May 25 11:08:32 PDT 2011


Author: ahatanak
Date: Wed May 25 13:08:32 2011
New Revision: 132070

URL: http://llvm.org/viewvc/llvm-project?rev=132070&view=rev
Log:
Update MaxCallFrameSize regardless of the relocation model selected.


Modified:
    llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp

Modified: llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp?rev=132070&r1=132069&r2=132070&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsISelLowering.cpp Wed May 25 13:08:32 2011
@@ -1319,20 +1319,20 @@
   Chain  = DAG.getNode(MipsISD::JmpLink, dl, NodeTys, &Ops[0], Ops.size());
   InFlag = Chain.getValue(1);
 
-  if (IsPIC) {
-    // Function can have an arbitrary number of calls, so
-    // hold the LastArgStackLoc with the biggest offset.
-    unsigned MaxCallFrameSize = MipsFI->getMaxCallFrameSize();
-    unsigned NextStackOffset = CCInfo.getNextStackOffset();
+  // Function can have an arbitrary number of calls, so
+  // hold the LastArgStackLoc with the biggest offset.
+  unsigned MaxCallFrameSize = MipsFI->getMaxCallFrameSize();
+  unsigned NextStackOffset = CCInfo.getNextStackOffset();
 
-    // For O32, a minimum of four words (16 bytes) of argument space is
-    // allocated.
-    if (Subtarget->isABI_O32())
-      NextStackOffset = std::max(NextStackOffset, (unsigned)16);
+  // For O32, a minimum of four words (16 bytes) of argument space is
+  // allocated.
+  if (Subtarget->isABI_O32())
+    NextStackOffset = std::max(NextStackOffset, (unsigned)16);
 
-    if (MaxCallFrameSize < NextStackOffset) {
-      MipsFI->setMaxCallFrameSize(NextStackOffset);
+  if (MaxCallFrameSize < NextStackOffset) {
+    MipsFI->setMaxCallFrameSize(NextStackOffset);
 
+    if (IsPIC) {    
       // $gp restore slot must be aligned.
       unsigned StackAlignment = TFL->getStackAlignment();
       NextStackOffset = (NextStackOffset + StackAlignment - 1) / 





More information about the llvm-commits mailing list