]> granicus.if.org Git - clang/commitdiff
Use function attributes to indicate if we don't want to realign the stack.
authorBill Wendling <isanbard@gmail.com>
Thu, 1 Aug 2013 21:41:02 +0000 (21:41 +0000)
committerBill Wendling <isanbard@gmail.com>
Thu, 1 Aug 2013 21:41:02 +0000 (21:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187617 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/BackendUtil.cpp
lib/CodeGen/CGCall.cpp

index 1bf49184fcf86a2e435604101b1245ac26c4bb1d..79cbc380a545b0f895ec5ddf5677c9ac05f386f6 100644 (file)
@@ -451,7 +451,6 @@ TargetMachine *EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) {
   Options.UnsafeFPMath = CodeGenOpts.UnsafeFPMath;
   Options.UseSoftFloat = CodeGenOpts.SoftFloat;
   Options.StackAlignmentOverride = CodeGenOpts.StackAlignment;
-  Options.RealignStack = CodeGenOpts.StackRealignment;
   Options.DisableTailCalls = CodeGenOpts.DisableTailCalls;
   Options.TrapFuncName = CodeGenOpts.TrapFuncName;
   Options.PositionIndependentExecutable = LangOpts.PIELevel != 0;
index b4c710c82c49acd5457ada41a3cfc27f6bd7c40d..11ee3883b30a51ae34d8c10ce96357f4900880a3 100644 (file)
@@ -1084,6 +1084,9 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI,
 
     FuncAttrs.addAttribute("no-frame-pointer-elim-non-leaf",
                            llvm::toStringRef(NoFramePointerElimNonLeaf));
+
+    if (!CodeGenOpts.StackRealignment)
+      FuncAttrs.addAttribute("no-realign-stack");
   }
 
   QualType RetTy = FI.getReturnType();