[llvm-commits] CVS: llvm/lib/CodeGen/MachineFunction.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Aug 12 11:06:47 PDT 2004



Changes in directory llvm/lib/CodeGen:

MachineFunction.cpp updated: 1.65 -> 1.66
---
Log message:

The only target that uses this code (v9) always has argsOnStackHaveFixedSize
set to true (obviously)


---
Diffs of the changes:  (+1 -16)

Index: llvm/lib/CodeGen/MachineFunction.cpp
diff -u llvm/lib/CodeGen/MachineFunction.cpp:1.65 llvm/lib/CodeGen/MachineFunction.cpp:1.66
--- llvm/lib/CodeGen/MachineFunction.cpp:1.65	Thu Jul 29 12:20:54 2004
+++ llvm/lib/CodeGen/MachineFunction.cpp	Thu Aug 12 13:06:35 2004
@@ -332,22 +332,7 @@
           if (numExtra <= 0)
             continue;
           
-          unsigned sizeForThisCall;
-          if (frameInfo.argsOnStackHaveFixedSize())
-            {
-              int argSize = frameInfo.getSizeOfEachArgOnStack(); 
-              sizeForThisCall = numExtra * (unsigned) argSize;
-            }
-          else
-            {
-              assert(0 && "UNTESTED CODE: Size per stack argument is not "
-                     "fixed on this architecture: use actual arg sizes to "
-                     "compute MaxOptionalArgsSize");
-              sizeForThisCall = 0;
-              for (unsigned i = 0; i < numOperands; ++i)
-                sizeForThisCall += target.getTargetData().getTypeSize(callInst->
-                                              getOperand(i)->getType());
-            }
+          unsigned sizeForThisCall = numExtra * 8;
           
           if (maxSize < sizeForThisCall)
             maxSize = sizeForThisCall;






More information about the llvm-commits mailing list