Skip to main content

Using Decision Trees to Improve Program-Based and Profile-Based Static Branch Prediction

  • Conference paper
Book cover Advances in Computer Systems Architecture (ACSAC 2005)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 3740))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Ball, T., Larus, J.R.: Branch prediction for free. In: PLDI, pp. 300–313 (June 1993)

    Google Scholar 

  2. 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)

    Google Scholar 

  3. 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)

    Article  Google Scholar 

  4. Cavazos, J., Moss, J.E.B.: Inducing heuristics to decide whether to schedule. In: PLDI, June 2004, pp. 183–194 (2004)

    Google Scholar 

  5. Debray, S., Evans, W., Muth, R., De Sutter, B.: Compiler techniques for code compaction. ACM ToPLaS 22(2), 378–415 (2000)

    Article  Google Scholar 

  6. 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)

    Google Scholar 

  7. 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)

    Google Scholar 

  8. Mitchell, T.M.: Machine Learning. McGraw-Hill, New York (1997)

    MATH  Google Scholar 

  9. Patil, H., Emer, J.: Combining static and dynamic branch prediction to reduce destructive aliasing. In: HPCA, Janauary 2000, pp. 251–262 (2000)

    Google Scholar 

  10. Patterson, J.R.C.: Accurate static branch prediction by value range propagation. In: PLDI, June 1995, pp. 67–78 (1995)

    Google Scholar 

  11. Quinlan, J.R.: C4.5: Programs for Machine Learning. Morgan Kaufmann, San Francisco (1993)

    Google Scholar 

  12. Savari, S., Young, C.: Comparing and combining profiles. JILP 2 (April 2000)

    Google Scholar 

  13. Smith, J.E.: A study of branch prediction strategies. In: ISCA, pp. 135–148 (May 1981)

    Google Scholar 

  14. 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)

    Google Scholar 

  15. Wall, D.W.: Predicting program behavior using real or estimated profiles. In: PLDI, June 1991, pp. 59–70 (1991)

    Google Scholar 

  16. Wong, W.F.: Source level static branch prediction. The Computer Journal 42(2), 142–149 (1999)

    Article  Google Scholar 

  17. Wu, Y., Larus, J.R.: Static branch frequency and program profile analysis. In: 27th MICRO, November 1994, pp. 1–11 (1994)

    Google Scholar 

  18. Young, C., Smith, M.D.: Improving the accuracy of static branch prediction using branch correlation. In: 6th ASPLOS, October 1994, pp. 232–241 (1994)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics