CppCon 2018 has ended
Back To Schedule
Wednesday, September 26 • 15:50 - 16:20
Easy::Jit: A Just-in-Time compilation library for C++

Sign up or log in to save this to your schedule, view media, leave feedback and see who's attending!

Compiled languages like C++ generally don't have access to Just-in-Time facilities, which limits the range of possible optimizations.
The Easy::Jit library introduces an hybrid approach that combines classical ahead of time compilation with user-specified dynamic recompilation of some functions, using runtime information to improve compiled code.

Easy::Jit still remains a high level library, aiming to provide a simple way to benefit from Just-in-Time compilation for non-compiler experts. The main abstractions from the library mimics other standard C++ constructs (as std::bind) to ease its adoption.

The library is composed of two main parts, the library interface and a compiler plugin. The library interface relies on metaprogramming to generate the appropiate low-level API calls. It also wraps the returned raw function pointers in a high-level object that performs type checking on the parameters of the call.
The compiler plugin is in charge of identifying whose bitcode implementation must be exposed at runtime and inject calls to the API that associate function pointers with the bitcode implementations.

avatar for Juan Manuel Martinez Caamaño

Juan Manuel Martinez Caamaño

Engineer, Quarkslab
Likes LLVM and just-in-time compilation.

Wednesday September 26, 2018 15:50 - 16:20 PDT
Keystone (404)
  • Metaprogramming and Reflection