diff options
author | Chris Lattner <sabre@nondot.org> | 2004-08-12 18:10:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-08-12 18:10:18 +0000 |
commit | 4f65fb38c64621952263b78d3a5e00b578155237 (patch) | |
tree | 45a4e3ef77f7751c36a79adc7a961873687761dd /lib/CodeGen | |
parent | 3927af8d70c0809c6286b3d14b350a2f04bd024b (diff) | |
download | external_llvm-4f65fb38c64621952263b78d3a5e00b578155237.zip external_llvm-4f65fb38c64621952263b78d3a5e00b578155237.tar.gz external_llvm-4f65fb38c64621952263b78d3a5e00b578155237.tar.bz2 |
Forward substitute some constants into their users
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15693 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/MachineFunction.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp index 95a4498..10ffa68 100644 --- a/lib/CodeGen/MachineFunction.cpp +++ b/lib/CodeGen/MachineFunction.cpp @@ -319,8 +319,6 @@ static unsigned 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 @@ ComputeMaxOptionalArgsSize(const TargetMachine& target, const Function *F, 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 @@ void MachineFunctionInfo::CalculateArgSize() { maxOptionalArgsSize = ComputeMaxOptionalArgsSize(MF.getTarget(), MF.getFunction(), maxOptionalNumArgs); - staticStackSize = maxOptionalArgsSize - + MF.getTarget().getFrameInfo()->getMinStackFrameSize(); + staticStackSize = maxOptionalArgsSize + 176; } int |