[llvm-commits] CVS: llvm/lib/CodeGen/MachineFunction.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Oct 29 17:41:01 PST 2002
Changes in directory llvm/lib/CodeGen:
MachineFunction.cpp updated: 1.27 -> 1.28
---
Log message:
Make argsize calculation stuff optional, so that Targets without FrameInfo
objects yet don't die
---
Diffs of the changes:
Index: llvm/lib/CodeGen/MachineFunction.cpp
diff -u llvm/lib/CodeGen/MachineFunction.cpp:1.27 llvm/lib/CodeGen/MachineFunction.cpp:1.28
--- llvm/lib/CodeGen/MachineFunction.cpp:1.27 Tue Oct 29 17:18:43 2002
+++ llvm/lib/CodeGen/MachineFunction.cpp Tue Oct 29 17:40:03 2002
@@ -38,7 +38,7 @@
}
bool runOnFunction(Function &F) {
- MachineFunction::construct(&F, Target);
+ MachineFunction::construct(&F, Target).CalculateArgSize();
return false;
}
};
@@ -173,7 +173,6 @@
}
-/*ctor*/
MachineFunction::MachineFunction(const Function *F,
const TargetMachine& target)
: Annotation(MF_AID),
@@ -183,10 +182,13 @@
currentTmpValuesSize(0), maxTmpValuesSize(0), compiledAsLeaf(false),
spillsAreaFrozen(false), automaticVarsAreaFrozen(false)
{
- maxOptionalArgsSize = ComputeMaxOptionalArgsSize(target, Fn,
+}
+
+void MachineFunction::CalculateArgSize() {
+ maxOptionalArgsSize = ComputeMaxOptionalArgsSize(Target, Fn,
maxOptionalNumArgs);
staticStackSize = maxOptionalArgsSize
- + target.getFrameInfo().getMinStackFrameSize();
+ + Target.getFrameInfo().getMinStackFrameSize();
}
int
More information about the llvm-commits
mailing list