Eighth Workshop on Interaction between Compilers and Computer Architectures, 2004. INTERACT-8 2004.
Download PDF

Abstract

Most dynamic binary translators use a two-phase approach to identify and optimize frequently executed code dynamically. In the profiling phase, blocks of code are interpreted or translated without optimization to collect execution frequency information for the blocks. In the optimization phase, frequently executed blocks are grouped into regions and advanced optimizations are applied on them. This approach implicitly assumes that the initial execution of each block is representative of the block throughout its lifetime. In particular, loop optimizations may use the block frequency information to determine loop trip counts to guide their optimizations. If the trip count information is incorrect, however, a loop may be improperly optimized, and program performance will suffer. In this paper we show that the initial profile is inadequate at predicting loop trip count information for several integer programs. We propose and evaluate efficient algorithms to continuously profile for trip count. Our result shows that accurate trip count information may be obtained with very low overhead (about 0.5%). This will enable advanced loop optimizations in dynamic binary translators.
Like what you’re reading?
Already a member?
Get this article FREE with a new membership!

Related Articles