Adaptive Meta-JIT Compilers

Meta-Just-In-Time compilers are a framework that generates a compiler for a language from an interpreter-definition of the language. Recent successes of RPython and Graal/Truffle demonstrated that the meta-JIT compilers are promising techniques to not only develop particular language implementations with JIT compilers, but also to develop many different languages on the same framework, to develop interoperable mechanisms among those languages, and to develop extended language mechanisms.

We study techniques to make meta-JIT compilers more adaptive. By adaptive, we mean that the JIT compilers can select appropriate regions of the source program and can apply different levels of optimizations based on the static/dynamic characteristics of the source program and the source language. For example, we aim at supporting method compilation for particular kinds of programs in PyPy, which only supports tracing compilation.

At the first step of this project, we develop a simple meta-tracing compiler framework, called BacCaml, which implements RPython-like tracing compilation by extending the MinCaml compiler. We devise techniques to perform method-compilation with this framework and study the performance characteristics of different kinds of programs.

At the second step, we study techniques to let the RPython framework support “baseline” compilations, which can be used at an earlier stage in an execution. We devise the ways to drive the RPython’s tracing engine to perform method compilation, the ways to perform quicker compilation with fewer optimizations, and the ways to enable those changes by merely giving one interpreter definition.

More information

News

Related projects

  • PyPy, a meta-compiler framework in (R)Python based on the tracing compilation strategy
  • Truffle/Graal, a meta-compiler framework in Java based on the method compilation strategy
  • The HipHop Virtual Machine, a virtual machine for PHP with both tracing and method compilation strategies