Source Level Static Branch Prediction

The ability to predict the directions of branches, especially conditional branches, is an important problem in modern computer architecture and advanced compilers. Many static and dynamic techniques have been proposed. Today, all state-of-the-art microprocessors have some form of hardware support for dynamic branch prediction. Static techniques, on the other hand, have not been widely studied because of the belief that they give poorer results. However, good static branch predictions are invaluable information for (static) compiler optimization or performance estimation. In this paper, we propose performing static branch prediction at the source code level. The assumption is that the source code contains information unavailable at the assembly or machine code level that may be used for branch prediction. Empirical studies on 14 integer Spec benchmarks indicate that the simple heuristics proposed can be effective in practice.

[1]  Dirk Grunwald,et al.  Corpus-based static branch prediction , 1995, PLDI '95.

[2]  Corporate The SPARC architecture manual (version 9) , 1994 .

[3]  David W. Wall,et al.  Predicting program behavior using real or estimated profiles , 2004, SIGP.

[4]  Alan Jay Smith,et al.  Branch Prediction Strategies and Branch Target Buffer Design , 1995, Computer.

[5]  James R. Larus,et al.  Branch prediction for free , 1993, PLDI '93.

[6]  S. McFarling Combining Branch Predictors , 1993 .

[7]  Todd C. Mowry,et al.  Compiler-based prefetching for recursive data structures , 1996, ASPLOS VII.

[8]  Joseph A. Fisher,et al.  Predicting conditional branch directions from previous runs of a program , 1992, ASPLOS V.

[9]  James E. Smith,et al.  A study of branch prediction strategies , 1981, ISCA '98.

[10]  David L Weaver,et al.  The SPARC architecture manual : version 9 , 1994 .

[11]  Michael A. Harrison,et al.  Accurate static estimators for program optimization , 1994, PLDI '94.

[12]  Dirk Grunwald,et al.  Static methods in hybrid branch prediction , 1998, Proceedings. 1998 International Conference on Parallel Architectures and Compilation Techniques (Cat. No.98EX192).

[13]  James R. Larus,et al.  Optimally profiling and tracing programs , 1992, POPL '92.

[14]  John L. Hennessy,et al.  The priority-based coloring approach to register allocation , 1990, TOPL.

[15]  Shlomo Weiss,et al.  POWER and PowerPC , 1994 .

[16]  Dirk Grunwald,et al.  Evidence-based static branch prediction using machine learning , 1997, TOPL.

[17]  Harvey G. Cragon,et al.  Branch strategy taxonomy and performance models , 1991, IEEE computer society press monograph.

[18]  David R. Ditzel,et al.  Branch folding in the CRISP microprocessor: reducing branch delay to zero , 1987, ISCA '87.

[19]  Robert B. Murray,et al.  Compiling for the CRISP Microprocessor , 1987, COMPCON.