Threaded Code Generation with a Meta-tracing JIT Compiler

06/23/2021
by   Yusuke Izawa, et al.
0

Language implementation frameworks, e.g., RPython and Truffle/Graal, are practical tools for creating efficient virtual machines, including a well-functioning just-in-time (JIT) compiler. It is demanding to support multi-tier JIT compilation in such a framework for language developers. This paper presents an idea to generate threaded code by reusing an existing meta-tracing JIT compiler, as well as an interpreter design for it. Our approach does not largely modify the RPython itself but constructs an effective interpreter definition to enable threaded code generation in RPython. We expect our system to be extended to support multi-level JIT compilation in the RPython framework. We measured the potential performance of our threaded code generation by simulating its behavior in PyPy. We confirmed that our approach reduced code sizes by 80 % and compilation times by 60 % compared to PyPy's JIT compiler on average, and ran about 7 % faster than the interpreter-only execution.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
11/06/2020

Amalgamating Different JIT Compilations in a Meta-tracing JIT Compiler Framework

Many modern virtual machines, such as JVMs, .NET Framework, and V8, empl...
research
05/29/2019

MCompiler: A Synergistic Compilation Framework

This paper presents a meta-compilation framework, the MCompiler. The mai...
research
02/05/2020

Patterns for Name Analysis and Type Analysis with JastAdd

In the last two decades, tools have been implemented to more formally sp...
research
01/23/2022

Two-level Just-in-Time Compilation with One Interpreter and One Engine

Modern, powerful virtual machines such as those running Java or JavaScri...
research
10/25/2019

Selective Lambda Lifting

Lambda lifting is a well-known transformation, traditionally employed fo...
research
07/26/2022

Reimplementing the Wheel: Teaching Compilers with a Small Self-Contained One

We report on a one-semester compiler construction course based on the id...
research
06/09/2021

Visualizing The Intermediate Representation of Just-in-Time Compilers

Just-in-Time (JIT) compilers are used by many modern programming systems...

Please sign up or login with your details

Forgot password? Click here to reset