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 | 7e4776776347d6007f59244e902f48537ab21dda (patch) | |
tree | 449efe80e3aadfc72364c746b1fece06de450235 /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | 836ec94c8e1e639ebbc18d0fb5541f6672ef2ebf (diff) | |
download | llvm-7e4776776347d6007f59244e902f48537ab21dda.zip llvm-7e4776776347d6007f59244e902f48537ab21dda.tar.gz llvm-7e4776776347d6007f59244e902f48537ab21dda.tar.bz2 |
Add support for the 'alignstack' attribute to the x86 backend. Fixes PR5254.
Also, FileCheck'ize a test.
llvm-svn: 96686
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index f141c56..4377d5b 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/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); |