Extend the IL for selecting TLS models (PR9788)
authorHans Wennborg <hans@hanshq.net>
Sat, 23 Jun 2012 11:37:03 +0000 (11:37 +0000)
committerHans Wennborg <hans@hanshq.net>
Sat, 23 Jun 2012 11:37:03 +0000 (11:37 +0000)
commitce718ff9f42c7da092eaa01dd0242e8d5ba84713
treed3c6b996686af3fc9f47f7b5407c773a86a4f653
parent47cbc4e0ee6098b7be3c60108000a979f1809949
Extend the IL for selecting TLS models (PR9788)

This allows the user/front-end to specify a model that is better
than what LLVM would choose by default. For example, a variable
might be declared as

  @x = thread_local(initialexec) global i32 42

if it will not be used in a shared library that is dlopen'ed.

If the specified model isn't supported by the target, or if LLVM can
make a better choice, a different model may be used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159077 91177308-0d34-0410-b5e6-96231b3b80d8
24 files changed:
docs/BitCodeFormat.html
docs/LangRef.html
include/llvm/GlobalVariable.h
lib/AsmParser/LLLexer.cpp
lib/AsmParser/LLParser.cpp
lib/AsmParser/LLParser.h
lib/AsmParser/LLToken.h
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Writer/BitcodeWriter.cpp
lib/Linker/LinkModules.cpp
lib/Target/CppBackend/CPPBackend.cpp
lib/Target/TargetMachine.cpp
lib/Transforms/IPO/GlobalOpt.cpp
lib/Transforms/Instrumentation/AddressSanitizer.cpp
lib/Transforms/Instrumentation/GCOVProfiling.cpp
lib/Transforms/Utils/CloneModule.cpp
lib/VMCore/AsmWriter.cpp
lib/VMCore/Core.cpp
lib/VMCore/Globals.cpp
lib/VMCore/IRBuilder.cpp
test/Assembler/tls-models.ll [new file with mode: 0644]
test/CodeGen/ARM/tls-models.ll [new file with mode: 0644]
test/CodeGen/Mips/tls-models.ll [new file with mode: 0644]
test/CodeGen/X86/tls-models.ll [new file with mode: 0644]