소스 검색

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187617 91177308-0d34-0410-b5e6-96231b3b80d8
Bill Wendling 12 년 전
부모
커밋
1cf9ab8ab8
2개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 0 1
      lib/CodeGen/BackendUtil.cpp
  2. 3 0
      lib/CodeGen/CGCall.cpp

+ 0 - 1
lib/CodeGen/BackendUtil.cpp

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

+ 3 - 0
lib/CodeGen/CGCall.cpp

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