[LLVMdev] Thread local global support in ExecutionEngine::getPointerToFunction() [was Re: Handling of thread_local globals by llc -march=cpp]

o.j.sivart at gmail.com o.j.sivart at gmail.com
Thu May 13 17:02:46 PDT 2010


Hi all,

Following on from "Handling of thread_local globals by llc -march=cpp" I thought I'd repost queries that lead on from this under a more appropriate new title. My query now is does ExecutionEngine::getPointerToFunction() and related support thread local global storage. Thread local storage is supported by clang, both in bc generation, assembly generation, and machine code, thus LLVM clearly has working support for thread local global storage. However in the case of 

On 14/05/2010, at 5:23 AM, Anton Korobeynikov wrote:

>> I note also that this is not a currently unsupported target case where an error should/could/would be produced on attempting to emit code with thread local references. I say this because clang is able to compile both c source with __thread on a global and bc containing a @variable = thread_local global ... and a function that references the thread local global variable to both assembly and machine code that has segment register offset addressing.
> Maybe TLS stuff is just broken inside JIT?
> 
> -- 
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University





More information about the llvm-dev mailing list