summaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorCharles Davis <cdavis@mines.edu>2010-02-19 18:17:13 +0000
committerCharles Davis <cdavis@mines.edu>2010-02-19 18:17:13 +0000
commit5dfa26795da9c521babd598ef911e6d95bd20d37 (patch)
treeb02c83edc5ea0f4896d29587b0f09d8426c08043 /lib/CodeGen/MachineFunction.cpp
parent00cb5b724547a821516292fe5cded7c6a5358bda (diff)
downloadllvm-5dfa26795da9c521babd598ef911e6d95bd20d37.tar.gz
llvm-5dfa26795da9c521babd598ef911e6d95bd20d37.tar.bz2
llvm-5dfa26795da9c521babd598ef911e6d95bd20d37.tar.xz
Add support for the 'alignstack' attribute to the x86 backend. Fixes PR5254.
Also, FileCheck'ize a test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96686 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineFunction.cpp')
-rw-r--r--lib/CodeGen/MachineFunction.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp
index f141c56770..4377d5bd71 100644
--- a/lib/CodeGen/MachineFunction.cpp
+++ b/lib/CodeGen/MachineFunction.cpp
@@ -95,6 +95,9 @@ MachineFunction::MachineFunction(Function *F, const TargetMachine &TM,
MFInfo = 0;
FrameInfo = new (Allocator.Allocate<MachineFrameInfo>())
MachineFrameInfo(*TM.getFrameInfo());
+ if (Fn->hasFnAttr(Attribute::StackAlignment))
+ FrameInfo->setMaxAlignment(Attribute::getStackAlignmentFromAttrs(
+ Fn->getAttributes().getFnAttributes()));
ConstantPool = new (Allocator.Allocate<MachineConstantPool>())
MachineConstantPool(TM.getTargetData());
Alignment = TM.getTargetLowering()->getFunctionAlignment(F);