Christian Wimmer

One Compiler: Deoptimization to Optimized Code

Christian Wimmer, Vojin Jovanovic, Erik Eckstein, Thomas Würthinger: One Compiler: Deoptimization to Optimized Code. In Proceedings of the International Conference on Compiler Construction, pages 55–64. ACM Press, 2017. doi:10.1145/3033019.3033025

Download as PDF
© ACM, 2017.


A multi-tier virtual machine (VM) deoptimizes and transfers last-tier execution to the first-tier execution when a speculative optimization is invalidated. The first-tier target of deoptimization is either an interpreter or code compiled by a baseline compiler. Because such a first-tier execution uses a fixed stack frame layout, this complicates all VM components that need to walk the stack. We propose to use the optimizing compiler also to compile deoptimization target code, i.e., the non-speculative first-tier code where execution continues after a deoptimization. Deoptimization entry points are described with the same scope descriptors used to describe the origin of the deoptimization, i.e., deoptimization is a two-way matching of two scope descriptors describing the same abstract frame at the same virtual program counter. We evaluate this deoptimization approach in a high-performance JavaScript VM. It strictly uses a one-compiler approach, i.e., all frames on the stack originate from the same compiler.