summaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-10-29 23:40:03 +0000
committerChris Lattner <sabre@nondot.org>2002-10-29 23:40:03 +0000
commit88726188fe9a3e30ec9bdd9f2449905c0d8cedcf (patch)
tree52096c68a79bd5b2b03163b925b02768ea3cd221 /lib/CodeGen
parentddd7fcb887be752ec8167276a697994ad9cb9c4e (diff)
downloadllvm-88726188fe9a3e30ec9bdd9f2449905c0d8cedcf.tar.gz
llvm-88726188fe9a3e30ec9bdd9f2449905c0d8cedcf.tar.bz2
llvm-88726188fe9a3e30ec9bdd9f2449905c0d8cedcf.tar.xz
Make argsize calculation stuff optional, so that Targets without FrameInfo
objects yet don't die git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4427 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/MachineFunction.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp
index c46c90632d..f18fb148b2 100644
--- a/lib/CodeGen/MachineFunction.cpp
+++ b/lib/CodeGen/MachineFunction.cpp
@@ -38,7 +38,7 @@ namespace {
}
bool runOnFunction(Function &F) {
- MachineFunction::construct(&F, Target);
+ MachineFunction::construct(&F, Target).CalculateArgSize();
return false;
}
};
@@ -173,7 +173,6 @@ SizeToAlignment(unsigned int size, const TargetMachine& target)
}
-/*ctor*/
MachineFunction::MachineFunction(const Function *F,
const TargetMachine& target)
: Annotation(MF_AID),
@@ -183,10 +182,13 @@ MachineFunction::MachineFunction(const Function *F,
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