aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-12-06 03:33:03 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-12-06 03:33:03 +0000
commit4e785c908ae01519d3592eae2828e2cc94fb02eb (patch)
tree9fbf4cdb3f97dc95aeaf3ce54121567713e2f05f /lib/CodeGen
parent68805fef77978e69a14584148a3c6a4239e34171 (diff)
Stack realignment is a tristate. Add -mno-stackrealign to turn off all stack
realignment, even with locals with alignment exceeding the ABI guarantee. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145909 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/BackendUtil.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp
index 3bc57e767c..5ef72d486e 100644
--- a/lib/CodeGen/BackendUtil.cpp
+++ b/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,