Use function attributes to indicate if we don't want to realign the stack.

llvm-svn: 187617
This commit is contained in:
Bill Wendling 2013-08-01 21:41:02 +00:00
parent 4d305dca52
commit d8f4950862
2 changed files with 3 additions and 1 deletions

View 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;

View 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();