Branch prediction for free
- 1 June 1993
- proceedings article
- Published by Association for Computing Machinery (ACM)
- Vol. 28 (6) , 300-313
- https://doi.org/10.1145/155090.155119
Abstract
Many compilers rely on branch prediction to improve program performance by identifying frequently executed regions and by aiding in scheduling instructions.Profile-based predictors require a time-consuming and inconvenient compile-profile-compile cycle in order to make predictions. We present a program-based branch predictor that performs well for a large and diverse set of programs written in C and Fortran. In addition to using natural loop analysis to predict branches that control the iteration of loops, we focus on heuristics for predicting non-loop branches, which dominate the dynamic branch count of many programs. The heuristics are simple and require little program analysis, yet they are effective in terms of coverage and miss rate. Although program-based prediction does not equal the accuracy of profile-based prediction, we believe it reaches a sufficiently high level to be useful. Additional type and semantic information available to a compiler would enhance our heuristics.Keywords
This publication has 7 references indexed in Scilit:
- Predicting conditional branch directions from previous runs of a programACM SIGPLAN Notices, 1992
- Optimally profiling and tracing programsPublished by Association for Computing Machinery (ACM) ,1992
- Predicting program behavior using real or estimated profilesACM SIGPLAN Notices, 1991
- CCGACM SIGPLAN Notices, 1991
- Profile guided code positioningACM SIGPLAN Notices, 1990
- Parallel processingPublished by Association for Computing Machinery (ACM) ,1984
- An execution profiler for modular programsSoftware: Practice and Experience, 1983