[PATCH] D42999: [TLS] use emulated TLS if the target supports only this mode

Chih-Hung Hsieh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 7 14:43:25 PST 2018


chh updated this revision to Diff 133315.
chh added a comment.

I don't think -fno-emulated-tls is used anywhere yet.
I should have not allowed that flag.
My original idea was to have only -femulated-tls for
targets like Android.

Anyway I don't want to disable -fno-emulated-tls now.
So the new patch has added ExplicitEmulatedTLS to
indicate that either -emulated-tls or -no-emulated-tls
is passed to code generator.
If ExplicitEmulatedTLS is not set, like current LTO,
we should use the target triple to decide EmulatedTLS.

I don't trust all front-end drivers to set -emulated-tls correctly.
There will be more tools to call llc.
We should have correct target dependent default for code generator.


https://reviews.llvm.org/D42999

Files:
  include/llvm/CodeGen/CommandFlags.def
  include/llvm/Target/TargetMachine.h
  include/llvm/Target/TargetOptions.h
  lib/CodeGen/AsmPrinter/AsmPrinter.cpp
  lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
  lib/CodeGen/LowerEmuTLS.cpp
  lib/CodeGen/TargetPassConfig.cpp
  lib/ExecutionEngine/TargetSelect.cpp
  lib/Target/AArch64/AArch64ISelLowering.cpp
  lib/Target/ARM/ARMISelLowering.cpp
  lib/Target/Mips/MipsISelLowering.cpp
  lib/Target/PowerPC/PPCISelLowering.cpp
  lib/Target/Sparc/SparcISelLowering.cpp
  lib/Target/SystemZ/SystemZISelLowering.cpp
  lib/Target/TargetMachine.cpp
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/AArch64/emutls.ll
  test/CodeGen/AArch64/emutls_generic.ll
  test/CodeGen/ARM/emutls.ll
  test/CodeGen/ARM/emutls_generic.ll
  test/CodeGen/Mips/emutls_generic.ll
  test/CodeGen/PowerPC/emutls_generic.ll
  test/CodeGen/X86/emutls-pic.ll
  test/CodeGen/X86/emutls-pie.ll
  test/CodeGen/X86/emutls.ll
  test/CodeGen/X86/emutls_generic.ll
  test/CodeGen/X86/fast-isel-emutls.ll
  test/CodeGen/X86/global-access-pie-copyrelocs.ll
  test/CodeGen/X86/global-access-pie.ll
  test/CodeGen/X86/tls-android-negative.ll
  test/CodeGen/X86/tls-android.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42999.133315.patch
Type: text/x-patch
Size: 21172 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180207/30b4dfb2/attachment.bin>


More information about the llvm-commits mailing list