[llvm] r180889 - Revert r180737. The companion patch was reverted, and this is not relevant right now.

Bill Wendling isanbard at gmail.com
Wed May 1 15:32:08 PDT 2013


Author: void
Date: Wed May  1 17:32:08 2013
New Revision: 180889

URL: http://llvm.org/viewvc/llvm-project?rev=180889&view=rev
Log:
Revert r180737. The companion patch was reverted, and this is not relevant right now.

Removed:
    llvm/trunk/test/CodeGen/X86/tls-init-funcs.ll
Modified:
    llvm/trunk/include/llvm/CodeGen/AsmPrinter.h
    llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/AsmPrinter.h?rev=180889&r1=180888&r2=180889&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/AsmPrinter.h (original)
+++ llvm/trunk/include/llvm/CodeGen/AsmPrinter.h Wed May  1 17:32:08 2013
@@ -486,7 +486,6 @@ namespace llvm {
                             unsigned uid) const;
     void EmitLLVMUsedList(const ConstantArray *InitList);
     void EmitXXStructorList(const Constant *List, bool isCtor);
-    void EmitTLSInitFuncs(const ConstantArray *InitList);
     GCMetadataPrinter *GetOrCreateGCPrinter(GCStrategy *C);
   };
 }

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=180889&r1=180888&r2=180889&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Wed May  1 17:32:08 2013
@@ -1254,11 +1254,6 @@ bool AsmPrinter::EmitSpecialLLVMGlobal(c
     return true;
   }
 
-  if (GV->getName() == "llvm.tls_init_funcs") {
-    EmitTLSInitFuncs(cast<ConstantArray>(GV->getInitializer()));
-    return true;
-  }
-
   return false;
 }
 
@@ -1325,16 +1320,6 @@ void AsmPrinter::EmitXXStructorList(cons
   }
 }
 
-/// EmitTLSInitFuncs - Emit the TLS initialization functions.
-void AsmPrinter::EmitTLSInitFuncs(const ConstantArray *InitList) {
-  const DataLayout *TD = TM.getDataLayout();
-  OutStreamer.SwitchSection(getObjFileLowering().getTLSThreadInitSection());
-  EmitAlignment(Log2_32(TD->getPointerPrefAlignment()));
-  for (unsigned I = 0, E = InitList->getNumOperands(); I != E; ++I)
-    EmitGlobalConstant(
-      dyn_cast<Constant>(InitList->getOperand(I)->stripPointerCasts()));
-}
-
 //===--------------------------------------------------------------------===//
 // Emission and print routines
 //

Removed: llvm/trunk/test/CodeGen/X86/tls-init-funcs.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/tls-init-funcs.ll?rev=180888&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/tls-init-funcs.ll (original)
+++ llvm/trunk/test/CodeGen/X86/tls-init-funcs.ll (removed)
@@ -1,89 +0,0 @@
-; RUN: llc < %s -mtriple x86_64-apple-macosx10 | FileCheck %s
-
-; CHECK: .section __DATA,__thread_init,thread_local_init_function_pointers
-; CHECK: .align 3
-; CHECK: .quad ___tls_init
-
-%struct.A = type { i8 }
-%struct.B = type { i32 }
-
- at i = thread_local global i32 37, align 4
- at a = thread_local global %struct.A zeroinitializer, align 1
- at b = thread_local global %struct.B zeroinitializer, align 4
- at z = global %struct.A zeroinitializer, align 1
- at y = global %struct.B zeroinitializer, align 4
- at __tls_guard = internal thread_local unnamed_addr global i1 false
- at llvm.global_ctors = appending global [1 x { i32, void ()* }] [{ i32, void ()* } { i32 65535, void ()* @_GLOBAL__I_a }]
- at llvm.tls_init_funcs = appending global [1 x void ()*] [void ()* @__tls_init]
-
- at _ZTH1i = alias void ()* @__tls_init
- at _ZTH1a = alias void ()* @__tls_init
- at _ZTH1b = alias void ()* @__tls_init
-
-declare void @_ZN1AC1Ev(%struct.A*)
-
-declare void @_ZN1BC1Ei(%struct.B*, i32)
-
-define internal void @_GLOBAL__I_a() section "__TEXT,__StaticInit,regular,pure_instructions" {
-entry:
-  tail call void @_ZN1AC1Ev(%struct.A* @z)
-  tail call void @_ZN1BC1Ei(%struct.B* @y, i32 42)
-  ret void
-}
-
-define internal void @__tls_init() {
-entry:
-  %.b = load i1* @__tls_guard, align 1
-  store i1 true, i1* @__tls_guard, align 1
-  br i1 %.b, label %exit, label %init
-
-init:                                             ; preds = %entry
-  tail call void @_ZN1AC1Ev(%struct.A* @a)
-  tail call void @_ZN1BC1Ei(%struct.B* @b, i32 927)
-  br label %exit
-
-exit:                                             ; preds = %entry, %init
-  ret void
-}
-
-define weak_odr hidden i32* @_ZTW1i() {
-  %.b.i = load i1* @__tls_guard, align 1
-  store i1 true, i1* @__tls_guard, align 1
-  br i1 %.b.i, label %__tls_init.exit, label %init.i
-
-init.i:                                           ; preds = %0
-  tail call void @_ZN1AC1Ev(%struct.A* @a)
-  tail call void @_ZN1BC1Ei(%struct.B* @b, i32 927)
-  br label %__tls_init.exit
-
-__tls_init.exit:                                  ; preds = %0, %init.i
-  ret i32* @i
-}
-
-define weak_odr hidden %struct.A* @_ZTW1a() {
-  %.b.i = load i1* @__tls_guard, align 1
-  store i1 true, i1* @__tls_guard, align 1
-  br i1 %.b.i, label %__tls_init.exit, label %init.i
-
-init.i:                                           ; preds = %0
-  tail call void @_ZN1AC1Ev(%struct.A* @a)
-  tail call void @_ZN1BC1Ei(%struct.B* @b, i32 927)
-  br label %__tls_init.exit
-
-__tls_init.exit:                                  ; preds = %0, %init.i
-  ret %struct.A* @a
-}
-
-define weak_odr hidden %struct.B* @_ZTW1b() {
-  %.b.i = load i1* @__tls_guard, align 1
-  store i1 true, i1* @__tls_guard, align 1
-  br i1 %.b.i, label %__tls_init.exit, label %init.i
-
-init.i:                                           ; preds = %0
-  tail call void @_ZN1AC1Ev(%struct.A* @a)
-  tail call void @_ZN1BC1Ei(%struct.B* @b, i32 927)
-  br label %__tls_init.exit
-
-__tls_init.exit:                                  ; preds = %0, %init.i
-  ret %struct.B* @b
-}





More information about the llvm-commits mailing list