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

Chris Lattner lattner at cs.uiuc.edu
Thu Aug 12 11:10:30 PDT 2004



Changes in directory llvm/lib/CodeGen:

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

Forward substitute some constants into their users


---
Diffs of the changes:  (+2 -5)

Index: llvm/lib/CodeGen/MachineFunction.cpp
diff -u llvm/lib/CodeGen/MachineFunction.cpp:1.66 llvm/lib/CodeGen/MachineFunction.cpp:1.67
--- llvm/lib/CodeGen/MachineFunction.cpp:1.66	Thu Aug 12 13:06:35 2004
+++ llvm/lib/CodeGen/MachineFunction.cpp	Thu Aug 12 13:10:18 2004
@@ -319,8 +319,6 @@
 ComputeMaxOptionalArgsSize(const TargetMachine& target, const Function *F,
                            unsigned &maxOptionalNumArgs)
 {
-  const TargetFrameInfo &frameInfo = *target.getFrameInfo();
-  
   unsigned maxSize = 0;
   
   for (Function::const_iterator BB = F->begin(), BBE = F->end(); BB !=BBE; ++BB)
@@ -328,7 +326,7 @@
       if (const CallInst *callInst = dyn_cast<CallInst>(I))
         {
           unsigned numOperands = callInst->getNumOperands() - 1;
-          int numExtra = (int)numOperands-frameInfo.getNumFixedOutgoingArgs();
+          int numExtra = numOperands-6;
           if (numExtra <= 0)
             continue;
           
@@ -370,8 +368,7 @@
   maxOptionalArgsSize = ComputeMaxOptionalArgsSize(MF.getTarget(),
 						   MF.getFunction(),
                                                    maxOptionalNumArgs);
-  staticStackSize = maxOptionalArgsSize
-    + MF.getTarget().getFrameInfo()->getMinStackFrameSize();
+  staticStackSize = maxOptionalArgsSize + 176;
 }
 
 int






More information about the llvm-commits mailing list