From 4e785c908ae01519d3592eae2828e2cc94fb02eb Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Tue, 6 Dec 2011 03:33:03 +0000 Subject: 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 --- lib/CodeGen/BackendUtil.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'lib/CodeGen/BackendUtil.cpp') 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, -- cgit v1.2.3