llvm-project/llvm/lib/ExecutionEngine/Orc
luxufan ff6069b891 [JITLink] Add initial native TLS support to ELFNix platform
This patch use the same way as the https://reviews.llvm.org/rGfe1fa43f16beac1506a2e73a9f7b3c81179744eb to handle the thread local variable.

It allocates 2 * pointerSize space in GOT to represent the thread key and data address. Instead of using the _tls_get_addr function, I customed a function __orc_rt_elfnix_tls_get_addr to get the address of thread local varible. Currently, this is a wip patch, only one TLS relocation R_X86_64_TLSGD is supported and I need to add the corresponding test cases.

To allocate the TLS  descriptor in GOT, I need to get the edge kind information in PerGraphGOTAndPLTStubBuilder, So I add a `Edge::Kind K` argument in some functions in PerGraphGOTAndPLTStubBuilder.h. If it is not suitable, I can think further to solve this problem.

Differential Revision: https://reviews.llvm.org/D109293
2021-09-13 14:35:49 +08:00
..
Shared [ORC] Add OrcShared dependency on LLVM_PTHREAD_LIB 2021-09-12 16:02:02 +10:00
TargetProcess [ORC] Add OrcTargetProcess dependency on LLVM_PTHREAD_LIB 2021-09-12 18:17:06 +10:00
CMakeLists.txt Re-apply bb27e45643 and 5629afea91 with fixes. 2021-09-12 14:23:22 +10:00
CompileOnDemandLayer.cpp [Orc] Remove unnecessary <string> include dependency from Orc headers. NFC. 2021-07-18 12:31:13 +01:00
CompileUtils.cpp
Core.cpp [ORC] Fix missing newline in debugging output. 2021-09-11 11:24:01 +10:00
DebugObjectManagerPlugin.cpp [Orc] Make usage of ResourceKeys thread-safe in DebugObjectManagerPlugin 2021-03-22 17:47:33 +01:00
DebugUtils.cpp [llvm] Use llvm::drop_begin (NFC) 2021-02-22 20:17:16 -08:00
ELFNixPlatform.cpp [JITLink] Add initial native TLS support to ELFNix platform 2021-09-13 14:35:49 +08:00
EPCDebugObjectRegistrar.cpp [ORC] Require ExecutorProcessControl when constructing an ExecutionSession. 2021-07-27 16:53:49 +10:00
EPCDynamicLibrarySearchGenerator.cpp [ORC] Require ExecutorProcessControl when constructing an ExecutionSession. 2021-07-27 16:53:49 +10:00
EPCEHFrameRegistrar.cpp [ORC] Require ExecutorProcessControl when constructing an ExecutionSession. 2021-07-27 16:53:49 +10:00
EPCGenericJITLinkMemoryManager.cpp Re-apply bb27e45643 and 5629afea91 with fixes. 2021-09-12 14:23:22 +10:00
EPCIndirectionUtils.cpp [ORC] Rename TargetProcessControl to ExecutorProcessControl. NFC. 2021-07-01 13:31:12 +10:00
ExecutionUtils.cpp [Orc] Remove unnecessary <string> include dependency from Orc headers. NFC. 2021-07-18 12:31:13 +01:00
ExecutorProcessControl.cpp [ORC] Add 'Async' suffix to ExecutorProcessControl::MemoryAccess methods. 2021-08-20 15:12:20 +10:00
IRCompileLayer.cpp [ORC] Add support for resource tracking/removal (removable code). 2020-10-18 21:02:54 -07:00
IRTransformLayer.cpp Re-apply "[ORC] Make MaterializationResponsibility immovable..." with fixes. 2020-09-11 14:09:05 -07:00
IndirectionUtils.cpp TransformUtils: Fix metadata handling in CloneModule (and improve CloneFunctionInto) 2021-02-15 11:56:00 -08:00
JITTargetMachineBuilder.cpp [ORC] Print CPU feature string in JITTargetMachineBuilder debugging output. 2021-02-19 15:18:19 +11:00
LLJIT.cpp [ORC] Require ExecutorProcessControl when constructing an ExecutionSession. 2021-07-27 16:53:49 +10:00
Layer.cpp [Orc] Use extensible RTTI for the orc::ObjectLayer class hierarchy 2021-02-26 13:13:05 +01:00
LazyReexports.cpp Revert "[Orc] Allow OrcGenericABI variant of LazyCallThroughManager" 2021-03-23 15:23:33 +01:00
LookupAndRecordAddrs.cpp [ORC] Introduce lookupAndRecordAddrs utility. 2021-08-20 15:12:19 +10:00
MachOPlatform.cpp [ORC] Introduce lookupAndRecordAddrs utility. 2021-08-20 15:12:19 +10:00
Mangling.cpp [ORC][ORC-RT] Reapply "Introduce ELF/*nix Platform and runtime..." with fixes. 2021-08-27 14:41:58 +10:00
ObjectLinkingLayer.cpp [ORC][ORC-RT] Reapply "Introduce ELF/*nix Platform and runtime..." with fixes. 2021-08-27 14:41:58 +10:00
ObjectTransformLayer.cpp [Orc] Use extensible RTTI for the orc::ObjectLayer class hierarchy 2021-02-26 13:13:05 +01:00
OrcABISupport.cpp [ORC] Remove a spurious reinterpret_cast. 2020-07-13 12:39:24 -07:00
OrcV2CBindings.cpp [ORC] Require ExecutorProcessControl when constructing an ExecutionSession. 2021-07-27 16:53:49 +10:00
RTDyldObjectLinkingLayer.cpp [Orc] Use extensible RTTI for the orc::ObjectLayer class hierarchy 2021-02-26 13:13:05 +01:00
SimpleRemoteEPC.cpp [ORC] Add bootstrap symbols to ExecutorProcessControl. 2021-09-12 18:49:43 +10:00
SpeculateAnalyses.cpp [llvm] Use llvm::sort (NFC) 2021-01-17 10:39:45 -08:00
Speculation.cpp Re-apply "[ORC] Make MaterializationResponsibility immovable..." with fixes. 2020-09-11 14:09:05 -07:00
ThreadSafeModule.cpp [ORC] cloneToNewContext() can work with a const-ref to ThreadSafeModule 2020-08-13 21:01:21 +02:00