forked from OSchip/llvm-project
Make argsize calculation stuff optional, so that Targets without FrameInfo
objects yet don't die llvm-svn: 4427
This commit is contained in:
parent
27ccb70df6
commit
90e64905b9
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue