Proceedings paper

Title:
Reusing Highly Optimized IR in Dynamic Compilation
Authors:
A. Pečimúth, D. Leopoldseder, P. Tůma
Publication:
39th European Conference on Object-Oriented Programming (ECOOP 2025)
DOI:
Year:
2025

Abstract:
Virtual machines (VMs) with dynamic compilers typically specialize compiled code to the state of the running VM instance and thus cannot reuse the code between multiple runs of the same application. The JIT compiler must recompile the same methods for each run of the application separately, which can prolong the application's warmup time. We propose a technique to reduce compilation time by reusing a highly optimized intermediate representation (IR). We achieve this by tracing compiler-interface calls during compilation. The validity of the specializations in the IR is verified during a replay stage, and the replay also facilitates the relocation of runtime object references. The IR is stored on a compilation server, which can compile it to machine code and provide the code to local or remote VM instances. We implemented a compilation server with IR caching for GraalVM, a high-performance production-grade Java Virtual Machine (JVM). We present an evaluation based on four industry-standard benchmark suites. In each suite, our approach reduces compilation time by 23.6\% to 36.8\% and warmup time by 13.1\% to 21.2\% on average while preserving peak application performance.

BibTeX:
@inproceedings{pecimuth_reusing_2025,
    title = {{Reusing Highly Optimized IR in Dynamic Compilation}},
    author = {Pečimúth, Andrej and Leopoldseder, David and Tůma, Petr},
    year = {2025},
    booktitle = {{39th European Conference on Object-Oriented Programming (ECOOP 2025)}},
    publisher = {Schloss Dagstuhl--Leibniz-Zentrum fuer Informatik},
    series = {{Leibniz International Proceedings in Informatics (LIPIcs)}},
    location = {Bergen, Norway},
    doi = {10.4230/LIPIcs.ECOOP.2025.32},
    volume = {333},
}