[llvm] r256134 - [Cygwin] Enable TLS as emutls.
NAKAMURA Takumi via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 20 18:37:24 PST 2015
Author: chapuni
Date: Sun Dec 20 20:37:23 2015
New Revision: 256134
URL: http://llvm.org/viewvc/llvm-project?rev=256134&view=rev
Log:
[Cygwin] Enable TLS as emutls.
It resolves clang selfhosting with std::once() for Cygwin.
FIXME: It may be EmulatedTLS-generic also for X86-Android.
FIXME: Pass EmulatedTLS to LLVM CodeGen from Clang with -femulated-tls.
Modified:
llvm/trunk/docs/ReleaseNotes.rst
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/docs/ReleaseNotes.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/ReleaseNotes.rst?rev=256134&r1=256133&r2=256134&view=diff
==============================================================================
--- llvm/trunk/docs/ReleaseNotes.rst (original)
+++ llvm/trunk/docs/ReleaseNotes.rst Sun Dec 20 20:37:23 2015
@@ -105,6 +105,14 @@ Changes to the PowerPC Target
During this release ...
+Changes to the X86 Target
+-----------------------------
+
+ During this release ...
+
+* TLS is enabled for Cygwin as emutls.
+
+
Changes to the OCaml bindings
-----------------------------
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=256134&r1=256133&r2=256134&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sun Dec 20 20:37:23 2015
@@ -12258,6 +12258,12 @@ SDValue
X86TargetLowering::LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const {
GlobalAddressSDNode *GA = cast<GlobalAddressSDNode>(Op);
+
+ // Cygwin uses emutls.
+ // FIXME: It may be EmulatedTLS-generic also for X86-Android.
+ if (Subtarget->isTargetWindowsCygwin())
+ return LowerToTLSEmulatedModel(GA, DAG);
+
const GlobalValue *GV = GA->getGlobal();
auto PtrVT = getPointerTy(DAG.getDataLayout());
More information about the llvm-commits
mailing list