Formally verified speculation and deoptimization in a JIT compiler
Aurèle Barrière, Sandrine Blazy, Olivier Flückiger, David Pichardie, Jan Vitek
Abstract
Just-in-time compilers for dynamic languages routinely generate code under assumptions that may be invalidated at run-time, this allows for specialization of program code to the common case in order to avoid unnecessary overheads due to uncommon cases. This form of software speculation requires support for deoptimization when some of the assumptions fail to hold. This paper presents a model just-in-time compiler with an intermediate representation that explicits the synchronization points used for deoptimization and the assumptions made by the compiler's speculation. We also present several common compiler optimizations that can leverage speculation to generate improved code. The optimizations are proved correct with the help of a proof assistant. While our work stops short of proving native code generation, we demonstrate how one could use the verified optimization to obtain significant speed ups in an end-to-end setting.
CCS Concepts: • Software and its engineering → Just-in-time compilers; • Theory of computation → Program verification.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 2e782a6b-44ac-43ea-9bad-671baa23b704Cited by top-tier papers10
- Formally Verified Native Code Generation in an Effectful JIT: Turning the CompCert Backend into a Formally Verified JIT CompilerAurèle Barrière, Sandrine Blazy, David PichardiePOPL 2023 · 27 citations
- Translation Validation for JIT Compiler in the V8 JavaScript EngineSeungwan Kwon, Jaeseong Kwon, Wooseok Kang, Juneyoung Lee et al.ICSE 2024 · 19 citations
- End-to-End Mechanized Proof of a JIT-Accelerated eBPF Virtual Machine for IoTShenghao Yuan, Frédéric Besson, Jean-Pierre TalpinCAV 2024 · 18 citations
- DeJITLeak: eliminating JIT-induced timing side-channel leaksQi Qin, JulianAndres JiYang, Fu Song, Taolue Chen et al.FSE 2022 · 18 citations
- Icarus: Trustworthy Just-In-Time Compilers with Symbolic Meta-ExecutionNaomi Smith, Abhishek Sharma, John Renner, David Thien et al.SOSP 2024 · 17 citations
Builds on1
Related papers
- Deoptless: speculation with dispatched on-stack replacement and specialized continuationsOlivier Flückiger, Jan Jecmen, Sebastián Krynski, Jan VitekPLDI 2022 · 5 citations
- Contextual dispatch for function specializationOlivier Flückiger, Guido Chari, Ming-Ho Yee, Jan Jecmen et al.OOPSLA 2020 · 31 citations
- CoSSJIT: Combining Static Analysis and Speculation in JIT CompilersAditya Anand, Vijay Sundaresan, Daryl Maier, Manas ThakurOOPSLA 2025 · 4 citations
- Graphiti: Formally Verified Out-of-Order Execution in Dataflow CircuitsYann Herklotz, Ayatallah Elakhras, Martina Camaioni, Paolo Ienne et al.ASPLOS 2026 · 1 citation
- Pattern-Based Peephole Optimizations with Java JIT TestsZhiqiang Zang, Aditya Thimmaiah, Milos GligoricISSTA 2023 · 2 citations
