[LLVMdev] Some basic questions regarding MCJIT and Kaleidoscope sample

David Blaikie dblaikie at gmail.com
Tue Feb 10 14:14:05 PST 2015


We (and by 'we' I mean 'Lang' (cc'd)) have recently been experimenting with
improvements/replacements to the MCJIT in the form of Orc, a new layered,
composable JIT API. There are examples of this in the Kaleidoscope code
samples (llvm/examples/Kaleidoscope/Orc) though not comprehensive tutorials
as yet.

On Tue, Feb 10, 2015 at 1:57 PM, Dibyendu Majumdar <mobile at majumdar.org.uk>
wrote:

> Hi,
>
> I am building a new JIT compiler for Lua (actually a derivative of
> Lua), and am planning to use LLVM for this. I have trying out some
> basic functions using LLVM 3.5.1. I have been puzzled by one aspect of
> the MCJIT versions of the Kaleidoscope sample, and would hugely
> appreciate some insight.
>
> Can a single MCJIT instance be used to manage several modules?
> Why is a separate MCJIT instance created for each module?
>
> Unfortunately the tutorial text does not explain the rationale for this.
>
> At the moment in my implementation I am putting each compiled function
> in its own module and creating an engine for it. This is so that each
> function can be managed independently and linked to garbage collection
> in Lua. However I do not know if there is a better way - for example
> creating a shared engine across all modules. I would also like to
> understand the trade offs with this approach versus other approaches.
>
> Many thanks
>
> Regards
> Dibyendu
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150210/c70a057d/attachment.html>


More information about the llvm-dev mailing list