skip to main content
10.1145/207110.207118acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article
Free Access

Corpus-based static branch prediction

Authors Info & Claims
Published:01 June 1995Publication History

ABSTRACT

Correctly predicting the direction that branches will take is increasingly important in today's wide-issue computer architectures. The name program-based branch prediction is given to static branch prediction techniques that base their prediction on a program's structure. In this paper, we investigate a new approach to program-based branch prediction that uses a body of existing programs to predict the branch behavior in a new program. We call this approach to program-based branch prediction, evidence-based static prediction, or ESP. The main idea of ESP is that the behavior of a corpus of programs can be used to infer the behavior of new programs. In this paper, we use a neural network to map static features associated with each branch to the probability that the branch will be taken. ESP shows significant advantages over other prediction mechanisms. Specifically, it is a program-based technique, it is effective across a range of programming languages and programming styles, and it does not rely on the use of expert-defined heuristics.

In this paper, we describe the application of ESP to the problem of branch prediction and compare our results to existing program-based branch predictors. We also investigate the applicability of ESP across computer architectures, programming languages, compilers, and run-time systems. Averaging over a body of 43 C and Fortran programs, ESP branch prediction results in a miss rate of 20%, as compared with the 25% miss rate obtained using the best existing program-based heuristics.

References

  1. 1.R. Alverson, D. Callahan, D. Cummings, B. Koblenz, A. Porterfield, and B. Smith. The tera computer system. In International Conference on Supercomputing, pages 1-6, June 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2.Vasanth Balasundaram, Geoffrey Fox, Ken Kennedy, and Ulrich Kremer. A static performance estimator to guide data partitioning decisions. In Third ACM SIGPLAN Symposium on Principles & Practice of Parallel Programming, pages 213-223, July 199 I. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3.Thomas Ball and James R. Larus. Branch prediction for free. In Proceedings of the SIGPLAN'93 Conference on Programming Language Design and Implementation, pages 300-313, June 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4.M. Berry. The Perfect Club Benchmarks: Effective performance evaluation of supercomputers. The International Journal of Supercomputer Applications, 3(3):5-40, Fall 1989.Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 5.Brad Calder and Dirk Grunwald. Fa~at & accurate instruction fetch and branch prediction. In 21st Annual International Symposium on Computer Architecture, pages 2-11. ACM, April 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6.Brad Calder and Dirk Grunwald. Reducing branch costs via branch alignment. In Six International Conference on Architectural Support for Programming Languages and Operating Systems, pages 242-251. ACM, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7.Brad Calder, Dirk Grunwald, and Benjamin Zorn. Quantifying behavioral differences between C and C++ programs. Journal of Programming Languages, 2(4), 1995. Also available as University of Colorado Technical Report CU-CS-698-94.Google ScholarGoogle Scholar
  8. 8.P. P. Chang and W. W. Hwu. Profile-guided automatic inline expansion for C programs. Software Practice and Experience, 22(5):349-376, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9.P. P. Chang, S. A. Mahlke, and W. W. Hwu. Using profile information to assist classic compiler code optimizations. Software Practice and Experience, 21(12):1301-1321, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10.A.P. Dempster, A generalization of bayesian inference. Journal of the Royal Statistical Society, 30:205-247,1968.Google ScholarGoogle Scholar
  11. 11.J. A. Fisher and S. M. Freudenberger. Predicting conditional branch directions from previous runs of a program. In Proceedings of the Fifth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS-V), pages 85-95, Boston, Mass., October 1992. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 12.Joseph A. Fisher. Trace scheduling: A technique for global microcode compaction. IEEE Transactions on Computers, C- 30(7):478-490, July 1981.Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13.Wen-mei W. Hwu and Pohua P. Chang. Achieving high instruction cache performance with an optimizing compiler. In 16thAnnual International Symposium on Computer Architecture, pages 242-251. ACM, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 14.Scott McFarling and John Hennessy. Reducing the cost of branches. In 13th Annual International Symposium of Computer Architecture, pages 396-403. Association for Computing Machinery, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 15.Judea Pearl. Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference. Morgan Kaufmann, San Mateo, CA, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 16.D.E. Rumelhart, G. E. Hinton, and R J. Williams. Parallel distributed processing: Explorations in the microstructure of cognition. Volume h Foundations, chapter Learning internal representations by error propagation, pages 318-362. MIT Press/Bradford Books, Cambridge, MA, 1986. D. E. Rumelhart and J. L. Mc- Clelland, editors. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 17.G. Shafer. A Mathematical Theory of Evidence. Princeton University Press, Princeton, NJ, 1976.Google ScholarGoogle Scholar
  18. 18.J.E. Smith. A study of branch prediction strategies. In 8thAnnual international Symposium of Computer Architecture, pages 135- 148. ACM, 1981. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 19.P. Smolensky, M. C. Mozer, and D. E. Rumelhart, editors. Mathemattcal perspectives on neural networks. Erlbaum, 1994. In press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 20.Amitabh Srivastava and Alan Eustace. ATOM: A system for building customized program analysis tools. In Proceedings of the SIGPLAN'94 Conference on Programming Language Design and lmplementatton, pages 196-205. ACM, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. 21.Tim A. Wagner, Vance Maverick, Susan Graham, and Michael Harrison. Accurate static estimators for program optimization. In Proceedings of the SIGPLAN'94 Conjerence on Programming Language Design and Implementation, pages 85-96, Orlando, Florida, June 1994. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. 22.Youfeng Wu and James R. tams. Static branch frequency and program profile analysis. In 27th International Symposium on Microarchitecture, San Jose, Ca, November 1994. IEEE. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. 23.Tse-Yu Yeh and Yale N. Patt. A comparison of dynamic branch predictors that use two levels of branch history. In 20th Annual International Symposium on Computer Architecture, pages 257- 266, San Diego, CA, May 1993. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Corpus-based static branch prediction

                Recommendations

                Comments

                Login options

                Check if you have access through your login credentials or your institution to get full access on this article.

                Sign in
                • Published in

                  cover image ACM Conferences
                  PLDI '95: Proceedings of the ACM SIGPLAN 1995 conference on Programming language design and implementation
                  June 1995
                  335 pages
                  ISBN:0897916972
                  DOI:10.1145/207110

                  Copyright © 1995 ACM

                  Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                  Publisher

                  Association for Computing Machinery

                  New York, NY, United States

                  Publication History

                  • Published: 1 June 1995

                  Permissions

                  Request permissions about this article.

                  Request Permissions

                  Check for updates

                  Qualifiers

                  • Article

                  Acceptance Rates

                  PLDI '95 Paper Acceptance Rate28of105submissions,27%Overall Acceptance Rate406of2,067submissions,20%

                  Upcoming Conference

                  PLDI '24

                PDF Format

                View or Download as a PDF file.

                PDF

                eReader

                View online with eReader.

                eReader