Disable stack realignment for functions with dynamic-sized alloca's

llvm-svn: 50155
This commit is contained in:
Anton Korobeynikov 2008-04-23 18:16:43 +00:00
parent a7495260ee
commit ca150edda6
1 changed files with 4 additions and 1 deletions

View File

@ -267,7 +267,10 @@ bool X86RegisterInfo::hasFP(const MachineFunction &MF) const {
bool X86RegisterInfo::needsStackRealignment(const MachineFunction &MF) const {
MachineFrameInfo *MFI = MF.getFrameInfo();;
return (MFI->getMaxAlignment() > StackAlign);
// FIXME: Currently we don't support stack realignment for functions with
// variable-sized allocas
return (MFI->getMaxAlignment() > StackAlign &&
!MFI->hasVarSizedObjects());
}
bool X86RegisterInfo::hasReservedCallFrame(MachineFunction &MF) const {