Advertisement

Exploiting Intra-function Correlation with the Global History Stack

  • Fei Gao
  • Suleyman Sair
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3553)

Abstract

The demand for more computation power in high-end embedded systems has put embedded processors on parallel evolution track as the RISC processors. Caches and deeper pipelines are standard features on recent embedded microprocessors. As a result of this, some of the performance penalties associated with branch instructions in RISC processors are becoming more prevalent in these processors. As is the case in RISC architectures, designers have turned to dynamic branch prediction to alleviate this problem. Global correlating branch predictors take advantage of the influence past branches have on future ones. The conditional branch outcomes are recorded in a global history register (GHR). Based on the hypothesis that most correlation is among intra-function branches, we provide a detailed analysis of the Global History Stack (GHS) in this paper. The GHS saves the global history in the return address stack when a call instruction is executed. Following the subsequent return, the history is restored from the stack. In addition, to preserve the correlation between the callee branches and the caller branches following the call instruction, we save a few of the history bits coming from the end of the callee’s execution. We also investigate saving the GHR of a function in the Branch Target Buffer (BTB) when it returns so that it can be restored when that function is called again. Our results show that these techniques improve the accuracy of several global history based prediction schemes by 4% on average. Consequently, performance improvements as high as 13% are attained.

Keywords

Return Address Conditional Branch Call Site Branch Prediction Branch Instruction 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    ARM Ltd.: ARM1136 Technical Reference Manual, Version r0p2 (2004), http://www.arm.com
  2. 2.
    Intel Corp.: The Intel(R) XScale(TM) Microarchitecture Technical Summary (2000), http://www.intel.com/design/intelxscale/
  3. 3.
    Analog Devices Inc.: Analog Devices Blackfin Processor Data Sheet (2005), http://www.analog.com/processors/processors/blackfin/
  4. 4.
    Seznec, A., Felix, S., Krishnan, V., Sazeides, Y.: Design tradeoffs for the Alpha EV8 conditional branch predictor. In: Proc. Ann. Int. Symp. Comput. Architecture, pp. 295–306 (2002)Google Scholar
  5. 5.
    Michaud, P., Seznec, A., Uhlig, R.: Trading conflict and capacity aliasing in conditional branch predictors. In: Proc. Ann. Int. Symp. Comput. Architecture (1997)Google Scholar
  6. 6.
    Seznec, A., Michaud, P.: De-aliased hybrid branch predictors. Technical Report RR-3618, Inria (1999)Google Scholar
  7. 7.
    Sprangle, E., Chappell, R., Alsup, M., Patt, Y.: The agree predictor: A mechanism for reducing negative branch history interference. In: Proc. Ann. Int. Symp. Comput. Architecture, pp. 284–291 (1997)Google Scholar
  8. 8.
    Eden, A.N., Mudge, T.: The YAGS branch prediction scheme. In: Proc. Ann. ACM/IEEE Int. Symp. Microarchitecture, pp. 69–77 (1998)Google Scholar
  9. 9.
    Lee, C.C., Chen, I.C., Mudge, T.N.: The bi-mode branch predictor. In: Proc. Ann. ACM/IEEE Int. Symp. Microarchitecture, pp. 4–13. Research Triangle Park, NC (1997)Google Scholar
  10. 10.
    Calder, B., Grunwald, D., Zorn, B.: Quantifying behavioral differences between C and C++ programs. Journal of Programming Languages 2 (1994)Google Scholar
  11. 11.
    Yeh, T.Y., Patt, Y.: Two-level adaptive branch prediction. In: Proc. Ann. Int. Symp. Microarchitecture (1991)Google Scholar
  12. 12.
    McFarling, S.: Combining branch predictors. Technical Report TN-36, Digital Equipment Corporation, Western Research Lab (1993)Google Scholar
  13. 13.
    Sechrest, S., Lee, C.C., Mudge, T.: Correlation and aliasing in dynamic branch predictors. In: Proc. Ann. Int. Symp. Comput. Architecture, pp. 22–32 (1996)Google Scholar
  14. 14.
    Evers, M., Patel, S.J., Chappell, R.S., Patt, Y.N.: An analysis of correlation and predictability: What makes two-level branch predictors work. In: Proc. Ann. Int. Symp. Comput. Architecture, Barcelona, Spain, pp. 52–61 (1998)Google Scholar
  15. 15.
    Thomas, R., Franklin, M., Wilkerson, C., Stark, J.: Improving branch prediction by dynamic dataflow-based identification of correlated branches from a large global history. In: Ann. Int. Symp. Comput. Architecture, San Diego, CA, pp. 314–323 (2003)Google Scholar
  16. 16.
    Yeh, T.Y., Patt, Y.: Alternative implementations of two-level adaptive branch prediction. In: Proc. Ann. Int. Symp. Comput. Architecture (1992)Google Scholar
  17. 17.
    Nair, R.: Dynamic path-based branch correlation. In: Proc. Ann. Int. Symp. Microarchitecture, pp. 15–23 (1995)Google Scholar
  18. 18.
    Jacobson, Q., Rotenberg, E., Smith, J.E.: Path-based next trace prediction. In: Proc. Int. Symp. Microarchitecture, pp. 14–23 (1997)Google Scholar
  19. 19.
    Burger, D.C., Austin, T.M.: The SimpleScalar tool set, version 2.0. Technical Report CS-TR-97-1342, U. of Wisconsin, Madison, WI (1997)Google Scholar
  20. 20.
    Shivakumar, P., Jouppi, N.P.: Cacti 3.0: An integrated cache timing, power, and area model. Technical Report (2001)Google Scholar
  21. 21.
    Stark, J., Evers, M., Patt, Y.N.: Variable length path branch prediction. In: Proc. Int. Conf. Architectural Support for Programming Languages and Operating Systems, pp. 170–179 (1998)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Fei Gao
    • 1
  • Suleyman Sair
    • 1
  1. 1.Department of Electrical and Computer EngineeringNC State UniversityRaleighUSA

Personalised recommendations