diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-12-06 03:33:03 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-12-06 03:33:03 +0000 |
commit | f4d3f7a0b9dc5a7bbb3e33cc0088c3404e69326b (patch) | |
tree | 73d1a7e4b166ecba3161ee20f0967f3aec56b51b /clang/lib/CodeGen/BackendUtil.cpp | |
parent | 5f115a78cb098c40e3873be1721ffa47f60e025e (diff) | |
download | llvm-f4d3f7a0b9dc5a7bbb3e33cc0088c3404e69326b.zip llvm-f4d3f7a0b9dc5a7bbb3e33cc0088c3404e69326b.tar.gz llvm-f4d3f7a0b9dc5a7bbb3e33cc0088c3404e69326b.tar.bz2 |
Stack realignment is a tristate. Add -mno-stackrealign to turn off all stack
realignment, even with locals with alignment exceeding the ABI guarantee.
llvm-svn: 145909
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r-- | clang/lib/CodeGen/BackendUtil.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 3bc57e7..5ef72d4 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -289,11 +289,6 @@ bool EmitAssemblyHelper::AddEmitPasses(BackendAction Action, llvm::TargetOptions Options; - if (CodeGenOpts.RealignStack) - Options.RealignStack = true; - if (CodeGenOpts.StackAlignment) - Options.StackAlignmentOverride = CodeGenOpts.StackAlignment; - // Set frame pointer elimination mode. if (!CodeGenOpts.DisableFPElim) { Options.NoFramePointerElim = false; @@ -322,6 +317,8 @@ bool EmitAssemblyHelper::AddEmitPasses(BackendAction Action, Options.NoZerosInBSS = CodeGenOpts.NoZeroInitializedInBSS; Options.UnsafeFPMath = CodeGenOpts.UnsafeFPMath; Options.UseSoftFloat = CodeGenOpts.SoftFloat; + Options.StackAlignmentOverride = CodeGenOpts.StackAlignment; + Options.RealignStack = CodeGenOpts.StackRealignment; TargetMachine *TM = TheTarget->createTargetMachine(Triple, TargetOpts.CPU, FeaturesStr, Options, |