@gron

An Intermediate Representation for Speculative Optimizations in a Dynamic Compiler

, , , , , and . Proceedings of the 7th ACM Workshop on Virtual Machines and Intermediate Languages, page 1--10. ACM, (2013)
DOI: 10.1145/2542142.2542143

Abstract

We present a compiler intermediate representation (IR) that allows dynamic speculative optimizations for high-level languages. The IR is graph-based and contains nodes fixed to control flow as well as floating nodes. Side-effecting nodes include a framestate that maps values back to the original program. Guard nodes dynamically check assumptions and, on failure, deoptimize to the interpreter that continues execution. Guards implicitly use the framestate and program position of the last side-effecting node. Therefore, they can be represented as freely floating nodes in the IR. Exception edges are modeled as explicit control flow and are subject to full optimization. We use profiling and deoptimization to speculatively reduce the number of such edges. The IR is the core of a just-in-time compiler that is integrated with the Java HotSpot VM. We evaluate the design decisions of the IR using major Java benchmark suites.

Description

An intermediate representation for speculative optimizations in a dynamic compiler

Links and resources

Tags