[LLVMdev] Deep JIT specialization

Nicolas Capens nicolas.capens at gmail.com
Thu May 27 06:08:48 PDT 2010


Hi all,

I'm attempting to use LLVM for run-time code specialization, but I'm facing
a performance hurdle. I'm currently performing the specialization during the
AST to LLVM IR translation, but unfortunately this leads to relatively slow
recompiles as LLVM has to perform all the heavy (optimization) passes over
and over again.

So I was hoping that by first creating unspecialized LLVM IR, optimizing
that as much as possible, and then performing the specializations starting
from this optimized IR, the recompiles would be significantly faster.
Currently the mem2reg and instcombine passes take the majority of
compilation time, which could be avoided using "deep" JIT specialization.

So my question is how do I get started with this? Currently tracking the
specialization parameters and caching the generated specialized functions is
done outside of LLVM. So I imagine I'll have to somehow inform LLVM of the
semi-constant values of the specialization parameters, without losing the
original (optimized) IR. Can I add and remove specialized function instances
at run-time?

Thanks for any pointers!

Kind regards,

Nicolas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100527/2296a76b/attachment.html>


More information about the llvm-dev mailing list