forked from OSchip/llvm-project
Use function attributes to indicate if we don't want to realign the stack.
llvm-svn: 187617
This commit is contained in:
parent
4d305dca52
commit
d8f4950862
|
@ -451,7 +451,6 @@ TargetMachine *EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) {
|
||||||
Options.UnsafeFPMath = CodeGenOpts.UnsafeFPMath;
|
Options.UnsafeFPMath = CodeGenOpts.UnsafeFPMath;
|
||||||
Options.UseSoftFloat = CodeGenOpts.SoftFloat;
|
Options.UseSoftFloat = CodeGenOpts.SoftFloat;
|
||||||
Options.StackAlignmentOverride = CodeGenOpts.StackAlignment;
|
Options.StackAlignmentOverride = CodeGenOpts.StackAlignment;
|
||||||
Options.RealignStack = CodeGenOpts.StackRealignment;
|
|
||||||
Options.DisableTailCalls = CodeGenOpts.DisableTailCalls;
|
Options.DisableTailCalls = CodeGenOpts.DisableTailCalls;
|
||||||
Options.TrapFuncName = CodeGenOpts.TrapFuncName;
|
Options.TrapFuncName = CodeGenOpts.TrapFuncName;
|
||||||
Options.PositionIndependentExecutable = LangOpts.PIELevel != 0;
|
Options.PositionIndependentExecutable = LangOpts.PIELevel != 0;
|
||||||
|
|
|
@ -1084,6 +1084,9 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI,
|
||||||
|
|
||||||
FuncAttrs.addAttribute("no-frame-pointer-elim-non-leaf",
|
FuncAttrs.addAttribute("no-frame-pointer-elim-non-leaf",
|
||||||
llvm::toStringRef(NoFramePointerElimNonLeaf));
|
llvm::toStringRef(NoFramePointerElimNonLeaf));
|
||||||
|
|
||||||
|
if (!CodeGenOpts.StackRealignment)
|
||||||
|
FuncAttrs.addAttribute("no-realign-stack");
|
||||||
}
|
}
|
||||||
|
|
||||||
QualType RetTy = FI.getReturnType();
|
QualType RetTy = FI.getReturnType();
|
||||||
|
|
Loading…
Reference in New Issue