A region-based compilation technique for dynamic compilers
Authors:
Open Access
- 1 January 2006
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Programming Languages and Systems
- Vol. 28 (1) , 134-174
Abstract
Method inlining and data flow analysis are two major optimization components for effective program transformations, but they often suffer from the existence of rarely or never executed code contained in the target method. One major problem lies in the assumption that the compilation unit is partitioned at method boundaries. This article describes the design and implementation of a region-based compilation technique in our dynamic optimization framework, in which the compiled regions are selected as code portions without rarely executed code. The key parts of this technique are the region selection, partial inlining, and region exit handling. For region selection, we employ both static heuristics and dynamic profiles to identify and eliminate rare sections of code. The region selection process and method inlining decisions are interwoven, so that method inlining exposes other targets for region selection, while the region selection in the inline target conserves the inlining budget, allowing more method inlining to be performed. The inlining process can be performed for parts of a method, not just for the entire body of the method. When the program attempts to exit from a region boundary, we trigger recompilation and then use on-stack replacement to continue the execution from the corresponding entry point in the recompiled code. We have implemented these techniques in our Java JIT compiler, and conducted a comprehensive evaluation. The experimental results show that our region-based compilation approach achieves approximately 4% performance improvement on average, while reducing the compilation overhead by 10% to 30%, in comparison to the traditional method-based compilation techniques.Keywords
This publication has 27 references indexed in Scilit:
- Design and evaluation of dynamic optimizations for a Java just-in-time compilerACM Transactions on Programming Languages and Systems, 2005
- An infrastructure for adaptive dynamic optimization2003
- Design, implementation and evaluation of adaptive recompilation with on-stack replacement2003
- Effective Enhancement of Loop Versioning in JavaLecture Notes in Computer Science, 2002
- Overview of the IBM Java Just-in-Time CompilerIBM Systems Journal, 2000
- Inlining of Virtual MethodsLecture Notes in Computer Science, 1999
- The superblock: An effective technique for VLIW and superscalar compilationThe Journal of Supercomputing, 1993
- The multiflow trace scheduling compilerThe Journal of Supercomputing, 1993
- Superblock formation using static program analysis1993
- Using profile information to assist classic code optimizationsSoftware: Practice and Experience, 1991