[llvm-dev] Dynamic recompilation with ORC JIT API
David Blaikie via llvm-dev
llvm-dev at lists.llvm.org
Mon Dec 7 10:17:47 PST 2020
+Lang for ORC JIT questions
On Sat, Nov 28, 2020 at 2:25 PM Sebastiano Miano via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> Dear all,
> I am recently playing a little bit with the ORC JIT APIs with the goal
> of creating a prototype of a JIT compiler that loads the IR module of
> a C++ class, compiles it and instantiates the class.
> During the execution, I would like to replace some class methods by
> recompiling them with an optimized version.
>
> I have started from the latest version of the KaleidoscopeJIT, using
> the CompileOnDemandLayer to perform a lazy compilation of the class.
> I have managed successfully to load the code and instantiate the
> object, by getting the pointer of a "factory" method in the IR Module
> that returns the object itself.
>
> What I want to do now is to trigger the recompilation of a specific
> class method (i.e., function in the IR Module), and perform some IR
> transformations before the function is compiled. Then, I would like to
> point the old function to the new version (through the
> IndirectStubManager).
> The questions are:
> 1. How can I trigger the re-optimization and re-compilation from the
> existing ExecutionSession? Is there a method in the
> CompileOnDemandLayer that allows it?
> 2. Do I need to "manually" update the trampoline through the
> IndirectStubManager, or it is automatically done once the new function
> is compiled?
>
> Thanks a lot,
> Sebastiano
> _______________________________________________
> 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/20201207/9be16517/attachment.html>
More information about the llvm-dev
mailing list