Correctness of Speculative Optimizations with Dynamic Deoptimization

Olivier Flückiger 1 Gabriel Scherer 1, 2 Ming-Ho Yee 1 Aviral Goel 1 Amal Ahmed 1, 3 Jan Vitek 1
2 PARSIFAL - Proof search and reasoning with logic specifications
LIX - Laboratoire d'informatique de l'École polytechnique [Palaiseau], Inria Saclay - Ile de France, X - École polytechnique, CNRS - Centre National de la Recherche Scientifique : UMR7161
Abstract : High-performance dynamic language implementations make heavy use of speculative optimizations to achieve speeds close to statically compiled languages. These optimizations are typically performed by a just-in-time compiler that generates code under a set of assumptions about the state of the program and its environment. In certain cases, a program may execute code compiled under assumptions that are no longer valid. The implementation must then deoptimize the program on-the-fly; this entails finding semantically equivalent code that does not rely on invalid assumptions, translating program state to that expected by the target code, and transferring control. This paper looks at the interaction between optimization and deoptimization, and shows that reasoning about speculation is surprisingly easy when assumptions are made explicit in the program representation. This insight is demonstrated on a compiler intermediate representation, named sourir, modeled after the high-level representation for a dynamic language. Traditional compiler optimizations such as constant folding, unreachable code elimination, and function inlining are shown to be correct in the presence of assumptions. Furthermore, the paper establishes the correctness of compiler transformations specific to deoptimization: namely unrestricted deoptimization, predicate hoisting, and assume composition.
Type de document :
Article dans une revue
Proceedings of the ACM on Programming Languages, ACM, In press, 〈10.1145/3158137〉
Liste complète des métadonnées

Littérature citée [23 références]  Voir  Masquer  Télécharger
Contributeur : Scherer Gabriel <>
Soumis le : jeudi 23 novembre 2017 - 17:27:55
Dernière modification le : jeudi 12 avril 2018 - 01:46:39


Fichiers produits par l'(les) auteur(s)


Distributed under a Creative Commons Paternité - Partage selon les Conditions Initiales 4.0 International License



Olivier Flückiger, Gabriel Scherer, Ming-Ho Yee, Aviral Goel, Amal Ahmed, et al.. Correctness of Speculative Optimizations with Dynamic Deoptimization. Proceedings of the ACM on Programming Languages, ACM, In press, 〈10.1145/3158137〉. 〈hal-01646765〉



Consultations de la notice


Téléchargements de fichiers