[llvm-dev] [cfe-dev] lli: LLVM ERROR: Cannot select: X86ISD::WrapperRIP TargetGlobalTLSAddress:i64

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Wed Feb 8 10:00:33 PST 2017


On 8 February 2017 at 09:50, Gaetano Checinski
<gaetano.checinski at gmail.com> wrote:
> > Unfortunately it doesn't look like lli has support for emulated TLS either, though that would be pretty simple to add.
> As an experiment I've `llvm::createLowerEmuTLSPass` into lli which added @__emutls_v.x and @__emutls_v.t.
> However i didn't have any __emultls_get_address calls in my IR.
> Is there a llvm pass or compiler-flag that replaces thread_locals with appropriate  __emultls_get_address calls ?

Oh, interesting. Looks like the pass only does a pretty small part of
the work. The rest happens to the DAG in
TargetLowering::LowerToTLSEmulatedModel, based on
TargetOptions::EmulatedTLS (there's a reasonable chance that would
also automatically add the pass).

Tim.


More information about the llvm-dev mailing list