diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2008-04-23 18:16:43 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2008-04-23 18:16:43 +0000 |
commit | 4f1233f4818d129664994d9302dedc272446ba8d (patch) | |
tree | cd9b70057fb672180839688d9f15c5fec6cb66a1 /lib | |
parent | cdd938198fc5aded51a16ef69e1a57bf8b76acce (diff) | |
download | external_llvm-4f1233f4818d129664994d9302dedc272446ba8d.tar.gz external_llvm-4f1233f4818d129664994d9302dedc272446ba8d.tar.bz2 external_llvm-4f1233f4818d129664994d9302dedc272446ba8d.zip |
Disable stack realignment for functions with dynamic-sized alloca's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50155 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/X86/X86RegisterInfo.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp index 31b9d046f6..9059a4e65e 100644 --- a/lib/Target/X86/X86RegisterInfo.cpp +++ b/lib/Target/X86/X86RegisterInfo.cpp @@ -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 { |