[llvm] r227511 - [LPM] Remove a PPC64 hack to try to work around a bad interaction

Chandler Carruth chandlerc at gmail.com
Thu Jan 29 15:26:37 PST 2015


Author: chandlerc
Date: Thu Jan 29 17:26:37 2015
New Revision: 227511

URL: http://llvm.org/viewvc/llvm-project?rev=227511&view=rev
Log:
[LPM] Remove a PPC64 hack to try to work around a bad interaction
between the linker's TLS optimizations and Clang's TLS code generation.

For now, Clang has been changed to disable linker TLS optimizations
until it (and LLVM more generally) are emitting TLS code sequences
compatible with the old bugs found in the linkers. That's a better fix
to handle bootstrapping on that platform.

Modified:
    llvm/trunk/include/llvm/Support/Compiler.h

Modified: llvm/trunk/include/llvm/Support/Compiler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Compiler.h?rev=227511&r1=227510&r2=227511&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Compiler.h (original)
+++ llvm/trunk/include/llvm/Support/Compiler.h Thu Jan 29 17:26:37 2015
@@ -391,16 +391,9 @@
 #elif defined(_MSC_VER)
 // MSVC supports this with a __declspec.
 #define LLVM_THREAD_LOCAL __declspec(thread)
-#elif defined(__clang__) && defined(__powerpc64__)
-// Clang, GCC, and all compatible compilers tend to use __thread. But we need
-// to work aronud a bug in the combination of Clang's compilation of
-// global-dynamic and local-dynamic TLS and the ppc64 linker relocations which
-// we do by forcing initial-exec. While that mode isn't strictly sufficient for
-// all possible DSO use cases, it will usually work with glibc.
-// FIXME: Make this conditional on the Clang version once this is fixed in
-// top-of-tree.
-#define LLVM_THREAD_LOCAL __thread __attribute__((tls_model("initial-exec")))
 #else
+// Clang, GCC, and other compatible compilers used __thread prior to C++11 and
+// we only need the restricted functionality that provides.
 #define LLVM_THREAD_LOCAL __thread
 #endif
 #else // !LLVM_ENABLE_THREADS





More information about the llvm-commits mailing list