[llvm-dev] Designing on-disk ObjectCache for JIT

Antoine Pitrou via llvm-dev llvm-dev at lists.llvm.org
Thu Aug 18 13:56:46 PDT 2016


On Thu, 18 Aug 2016 20:23:08 +0000
PaweĊ‚ Bylica via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> Hi Lang, LLVM,
> Do you have any suggestions about implementing on-disk ObjectCache for
> MCJIT/Orc? Anyone is able to point me to / share some existing code?

You can find what we did for llvmlite and Numba here.

There's a low-level C shim in llvmlite, wrapping the C++ APIs to make
them callable using ctypes from Python:

Then there's a Python wrapper around that in llvmlite, to make the API
handle regular Python objects:

Then there's a higher-level abstraction in Numba that works around the
callback-oriented nature of the LLVM API, and also handles additional
tasks such as finalizing the module after loading the object code:

I'm afraid this code is quite a mouthful :-)



More information about the llvm-dev mailing list