filmov
tv
CppCon 2018: Juan Manuel Martinez Caamaño “Easy::Jit: A Just-in-Time compilation library for C++”
Показать описание
—
—
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.
—
Juan Manuel Martinez Caamaño
Engineer, Quarkslab
Likes LLVM and just-in-time compilation.
—
*-----*
*-----*
—
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.
—
Juan Manuel Martinez Caamaño
Engineer, Quarkslab
Likes LLVM and just-in-time compilation.
—
*-----*
*-----*
Комментарии