[llvm-dev] New ORC v2 LLJIT - global variables

David Blaikie via llvm-dev llvm-dev at lists.llvm.org
Mon Aug 12 10:26:39 PDT 2019

+Lang Hames <lhames at gmail.com>, Admiral of the Orcish Fleet (Lang's the
primary developer/creator of the ORC JIT & might have some answers to your

On Thu, Aug 8, 2019 at 4:15 PM chris boese via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> We are trying to switch to the new orc v2 lljit engine at my work with
> hopes of parallel jitting. We are switching from the ExecutionEngine w/
> OrcMCJitReplacement. We are having a hard time with global variables. We
> have found a way to create/emit new globals during jitting by using the old
> ExecutionEngine::getOrEmitGlobalVariable. Is there an easier way to do this
> with the new jit engine? We were hoping to create a new ThreadSafeModule,
> add a GlobalVariable, and then add the module to the JIT engine through
> addLazyIRModule(), but this doesn't seem to work.
> 2nd question; Is the lookup function supposed to work with global
> variables by name? Looking through the CompileOnDemandLayer it seems to
> change the names of globals to "__orc_lcl.<name><id>". Does this affect the
> lookup methods? I noticed that all of the globals we are looking for are
> tagged with Internal linkage and end up getting emitted through
> extractSubModule().
> Any help is appreciated.
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190812/443cfd1e/attachment.html>

More information about the llvm-dev mailing list