diff options
author | Charles Davis <cdavis@mines.edu> | 2010-02-19 18:17:13 +0000 |
---|---|---|
committer | Charles Davis <cdavis@mines.edu> | 2010-02-19 18:17:13 +0000 |
commit | 5dfa26795da9c521babd598ef911e6d95bd20d37 (patch) | |
tree | b02c83edc5ea0f4896d29587b0f09d8426c08043 /lib/CodeGen/MachineFunction.cpp | |
parent | 00cb5b724547a821516292fe5cded7c6a5358bda (diff) |
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.cpp | 3 |
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); |