Adding Reoptimization Support to ORC

Hi everyone,

I have recently been working on the ORCv2 API and saw that despite ORC not having official support for in-jit code reoptimization, it is a planned feature. In a recent discussion with @lhames , he informed me that both he and @vvassilev are interested in pursuing the implementation.

My end goal is to be able to reoptimize (and recompile) IR functions with different optimizations based on runtime metrics, and thus the implementation should be as fine-grained as possible.

Hopefully, we can work together into achieving this goal.

1 Like

Hi @ulsac, that is exciting!

I was wondering if you plan to do the work in the context of the upcoming Google Summer Of Code. If that’s the case we can create a new entry in GSoC - LLVM Discussion Forums and discuss possible implementation with a more concrete proposal, etc.

Hi @vvassilev !

Unfortunately no. I am a PhD student, and JIT recompilation is essential to the core of my research topic. As such, I intend to develop a proof of concept as fast as I possibly can but am also interested in helping with the development of a generic layer for use inside Orc in a reasonable time frame.

Hi @vvassilev,
Have you finished this support? I am also interested in this and want to research in this!

Hi @Thrrreeee,

We have made some progress in the area. I believe some of the work is still as a pull request and not yet merged. @sunho and @lhames were working on landing this.

Here is a video that summarizes what we have done https://www.youtube.com/watch?v=2ST0Rz_pC58

As immediate next step we need to land the pull request in llvm mainline and continue experiment with different setups on bigger workflows. I have a few ideas how to apply this at scale to a framework with a lot of virtual functions. If you are interested please ping me on discord and we can chat in a more interactive way.