mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
Implement the local-dynamic TLS model for x86 (PR3985)
This implements codegen support for accesses to thread-local variables using the local-dynamic model, and adds a clean-up pass so that the base address for the TLS block can be re-used between local-dynamic access on an execution path. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157818 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -147,6 +147,10 @@ bool X86PassConfig::addInstSelector() {
|
||||
// Install an instruction selector.
|
||||
PM->add(createX86ISelDag(getX86TargetMachine(), getOptLevel()));
|
||||
|
||||
// For ELF, cleanup any local-dynamic TLS accesses.
|
||||
if (getX86Subtarget().isTargetELF() && getOptLevel() != CodeGenOpt::None)
|
||||
PM->add(createCleanupLocalDynamicTLSPass());
|
||||
|
||||
// For 32-bit, prepend instructions to set the "global base reg" for PIC.
|
||||
if (!getX86Subtarget().is64Bit())
|
||||
PM->add(createGlobalBaseRegPass());
|
||||
|
||||
Reference in New Issue
Block a user