Abstract
Improving static branch prediction accuracy is an important problem with various interesting applications. First, several compiler optimizations such as code layout, scheduling, predication, etc. rely on accurate static branch prediction. Second, branches that are statically accurately predictable can be removed from the dynamic branch predictor thereby reducing aliasing. Third, for embedded microprocessors which lack dynamic branch prediction, static branch prediction is the only alternative.
This paper builds on previous work done on evidence-based static branch prediction which uses decision trees to classify branches. We demonstrate how decision trees can be used to improve the Ball and Larus heuristics by optimizing the sequence of applying the heuristics and by discovering two new heuristics, namely one based on the postdomination relationship between the current basic block and its successor and one based on the dependency distance between the branch and its operand defining instruction. Experimental results indicate an increase in the number of instructions per mispredicted branch by 18.5% on average for SPECint95 and SPECint2000. In addition, we show that decision trees can improve profile-based static branch prediction by up to 11.7% by predicting branches that are unseen in the profile runs.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Ball, T., Larus, J.R.: Branch prediction for free. In: PLDI, pp. 300–313 (June 1993)
Bandyopadhyay, S., Begwani, V.S., Murray, R.B.: Compiling for the CRISP microprocessor. In: Proc. of the Spring 1987 COMPCON, February 1987, pp. 96–100 (1987)
Calder, B., Grunwald, D., Jones, M., Lindsay, D., Martin, J., Mozer, M., Zorn, B.: Evidence-based static branch prediction using machine learning. ACM Transactions on Programming Languages and Systems 19(1), 188–222 (1997)
Cavazos, J., Moss, J.E.B.: Inducing heuristics to decide whether to schedule. In: PLDI, June 2004, pp. 183–194 (2004)
Debray, S., Evans, W., Muth, R., De Sutter, B.: Compiler techniques for code compaction. ACM ToPLaS 22(2), 378–415 (2000)
Deitrich, B.L., Cheng, B.-C., mei, W., Hwu, W.: Improving static branch prediction in a compiler. In: PACT, October 1998, pp. 214–221 (1998)
Fisher, J.A., Freudenberger, S.M.: Predicting conditional branch directions from previous runs of a program. In: 5th ASPLOS, October 1992, pp. 85–95 (1992)
Mitchell, T.M.: Machine Learning. McGraw-Hill, New York (1997)
Patil, H., Emer, J.: Combining static and dynamic branch prediction to reduce destructive aliasing. In: HPCA, Janauary 2000, pp. 251–262 (2000)
Patterson, J.R.C.: Accurate static branch prediction by value range propagation. In: PLDI, June 1995, pp. 67–78 (1995)
Quinlan, J.R.: C4.5: Programs for Machine Learning. Morgan Kaufmann, San Francisco (1993)
Savari, S., Young, C.: Comparing and combining profiles. JILP 2 (April 2000)
Smith, J.E.: A study of branch prediction strategies. In: ISCA, pp. 135–148 (May 1981)
Stephenson, M., Amarasinghe, S., Martin, M., O’Reilly, U.-M.: Meta optimization: improving compiler heuristics with machine learning. In: PLDI, June 2003, pp. 77–90 (2003)
Wall, D.W.: Predicting program behavior using real or estimated profiles. In: PLDI, June 1991, pp. 59–70 (1991)
Wong, W.F.: Source level static branch prediction. The Computer Journal 42(2), 142–149 (1999)
Wu, Y., Larus, J.R.: Static branch frequency and program profile analysis. In: 27th MICRO, November 1994, pp. 1–11 (1994)
Young, C., Smith, M.D.: Improving the accuracy of static branch prediction using branch correlation. In: 6th ASPLOS, October 1994, pp. 232–241 (1994)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2005 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Desmet, V., Eeckhout, L., De Bosschere, K. (2005). Using Decision Trees to Improve Program-Based and Profile-Based Static Branch Prediction. In: Srikanthan, T., Xue, J., Chang, CH. (eds) Advances in Computer Systems Architecture. ACSAC 2005. Lecture Notes in Computer Science, vol 3740. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11572961_27
Download citation
DOI: https://doi.org/10.1007/11572961_27
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-29643-0
Online ISBN: 978-3-540-32108-8
eBook Packages: Computer ScienceComputer Science (R0)