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 | e64f008fe3740745e388034fb9463f74d1920923 (patch) | |
tree | 4af2b6dc9f8bd3682f30dbc36d318f4d36cdbbf1 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | eb023134139bdf3c8e12bbbb3c77d3a8f9c88f4b (diff) | |
download | llvm-e64f008fe3740745e388034fb9463f74d1920923.zip llvm-e64f008fe3740745e388034fb9463f74d1920923.tar.gz llvm-e64f008fe3740745e388034fb9463f74d1920923.tar.bz2 |
Forward substitute some constants into their users
llvm-svn: 15693
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 95a4498..10ffa68 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/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 |