[llvm-dev] How to recompile functions with ORC JIT?

David Blaikie via llvm-dev llvm-dev at lists.llvm.org
Fri May 27 10:38:11 PDT 2016


+Lang

Ultravague answer: There are a few different Orc layers for different
levels of indirection needed for different levels of substitutability. One
way is to indirect every call through global function pointers - so when
you want to replace the function you write the new function pointer to the
global variable. I forget which layers do which kinds of indirection.

- Dave

On Thu, May 26, 2016 at 11:49 PM, Theodoros Theododiris via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hello,
>
> I am trying to figure out how to recompile functions multiple times during
> run-time with ORC JIT
>
> and I'd appreciate any help/advice.
>
>
> My use case is t he following: every time a function of interest
> (annotated) is called, profiling data
>
> are gathered. Given enough data the function is recompiled using different
> optimizations. This happens
>
> repeatedly until the "best" optimization parameters are found.
>
>
> A similar question was asked before and a solution was suggested:
>
> http://lists.llvm.org/pipermail/llvm-dev/2015-July/088665.html
>
>
> What I am trying to figure out is how the function pointer can be updated
> to point to the newly
>
> compiled version.
>
>
> Thanks,
>
> Theodor
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://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/20160527/141a7556/attachment.html>


More information about the llvm-dev mailing list