Accurate Prediction of Polymorphic Indirect Branch Target

간접 분기의 타형태 타겟 주소의 정확한 예측

  • 백경호 (순천향대학교 정보기술공학부) ;
  • 김은성 (순천향대학교 정보기술공학부)
  • Published : 2004.11.01

Abstract

Modern processors achieve high performance exploiting avaliable Instruction Level Parallelism(ILP) by using speculative technique such as branch prediction. Traditionally, branch direction can be predicted at very high accuracy by 2-level predictor, and branch target address is predicted by Branch Target Buffer(BTB). Except for indirect branch, each of the branch has the unique target, so its prediction is very accurate via BTB. But because indirect branch has dynamically polymorphic target, indirect branch target prediction is very difficult. In general, the technique of branch direction prediction is applied to indirect branch target prediction, and much better accuracy than traditional BTB is obtained for indirect branch. We present a new indirect branch target prediction scheme which combines a indirect branch instruction with its data dependent register of the instruction executed earlier than the branch. The result of SPEC benchmark simulation which are obtained on SimpleScalar simulator shows that the proposed predictor obtains the most perfect prediction accuracy than any other existing scheme.

현대적인 프로세서들은 그 성능을 높이기 위해서 분기 예측과 같은 투기적인 방식으로 가용한 ILP 즉 명령어 수준의 병렬성을 추구한다. 전통적으로, 분기 방향은 2-단계 예측기를 사용하여 아주 높은 비율의 정확도로 예측이 가능하고, 분기 타겟 주소는 BTB를 사용하여 예측한다. 간접 분기를 제외한 모든 분기들은 그 자신의 타겟 주소가 유일하기 때문에 BTB로 거의 정확하게 예측되지만, 간접 분기는 그 타겟 주소가 동적으로 수시로 달라지기 때문에 예측하기가 매우 어렵다. 일반적으로, 분기 방향을 예측하는 기술을 간접 분기의 타겟 주소를 예측하는데 적용하여 전통적인 BTB 보다 훨씬 좋은 정확도를 얻고 있다. 본 논문에서는 간접 분기 명령과 이와 데이터 종속적인 관계를 갖고 있는 이 간접 분기 명령 보다 훨씬 앞서 수행되는 명령어의 레지스터 내용을 결합하여 간접 분기의 타겟을 예측하는 전혀 새로운 방법을 제안한다. 제안된 방식의 효율성을 검증하기 위해 심플스칼라 시뮬레이터 상에서 제안된 예측기를 구현하고 SPEC 벤치마크를 시뮬레이션하여, 수시로 바뀌는 간접분기의 타겟을 거의 완벽하게 예측할 수 있음을 보이고, 기존의 다른 어떤 방법보다도 우수한 결과임을 보인다.

Keywords

References

  1. D. W. Wall, 'Limits of Instruction-Level Parallelisrn', 4th Int'l Conf. on Architectural Support for Programming Languages and Operating Systems, pp. 176-188, Santa Clara, U.S.A., Apr. 1991
  2. J. K. F. Lee and A. J. Smith, 'Branch Prediction Strategies and Branch Target Buffer Design', IEEE Computer Magazine, 17(1), Jan. 1984
  3. C. Perleberg and A. J. Smith, 'Branch Target Buffer Design and Optimization', IEEE Transactions on Computers, 42(4), pp. 396-412, Apr. 1993 https://doi.org/10.1109/12.214687
  4. B. Calder and D. Grunwald, 'Fast & Accurate Instruction Fetch and Branch Prediction', 21th Int'l Symp, on Computer Architecture, pp. 2-11, Chicago, U.S.A., Apr. 1994 https://doi.org/10.1109/ISCA.1994.288166
  5. T. Y. Yeh and Y. N. Patt, 'Alternative Implementation of Two Level Adaptive Training Branch Predictions', 19th Int'l Symp, on Computer Architecture, pp. 124-134, Gold Coast, Australia, May 1992
  6. S. McFarling, 'Combining Branch Predictions', TN 36, DEC-WRL, June 1993
  7. E. Sprangle, R. S. Chappell, M. Alsup and Y. N. Patt, 'The Agree Predictor: A Mechanism for . Reducing Negative Branch History Interference', 24th Int'I Symp. on Computer Architecture, pp. 284-291, Denver, U.S.A., June 1997
  8. C. -C. Lee, I. K. Chen and T. N. Mudge, 'The Bi-Mode Branch Predictor', 30th Int'l Symp. on Microarchitecture, pp. 4-13, Research Triangle Park, U.S.A, Dec. 1997 https://doi.org/10.1109/MICRO.1997.645792
  9. A. N. Eden and T. N. Mudge, 'The Yags Branch Predictor', 31th Int'l Symp. on Microarchitecture, pp. 69-77, Dallas, U.S.A., Dec. 1998 https://doi.org/10.1109/MICRO.1998.742770
  10. D. A. Jimenes and C. Lin, 'Dynamic Branch Prediction with Perceptron', 7th Int'l Symp. on High Performance Computer Architecture, pp. 197-206, Monterrey, Mexico, Jan. 2001 https://doi.org/10.1109/HPCA.2001.903263
  11. A. Seznec, S. Felix, V. Krishnan and Y. Sazeides, 'Design Tradeoffs for the Alpha EV8 Conditional Branch Predictor', 29th Int'l Symp. on Computer Architecture, pp. 295-306, Anchorage, U.S.A., May 2002 https://doi.org/10.1109/ISCA.2002.1003587
  12. P. Y. Chang, E. Hao and Y. N. Patt, 'Target Prediction for Indirect Jumps', 24th Int'l Symp. on Computer Architecture, pp. 274-283, Denver, U.S.A., June 1997 https://doi.org/10.1145/264107.264209
  13. K. Driesen and U. Holzle, 'Accurate Indirect Branch Prediction', 25th Int'l Symp. on Computer Architecture, pp. 167-178, Barcelona, Spain, July 1998 https://doi.org/10.1109/ISCA.1998.694772
  14. K. Driesen and U. Holzle, 'The Cascaded Predictor: Economical and Adaptive Branch Target Prediction', 31th Int'l Symp. on Microarchitecture, pp. 249-258, Dallas, U.S.A., Dec. 1998
  15. K. Driesen and U. Holzle, 'Multi-Stage Cascaded Prediction', 5th Int'l Euro-Par Conf. on Parallel Processing, pp. 1312-1321, Toulouse, France, Aug. 1999
  16. J. Kalamatianos and D. R. Kaeli, 'Improving the Accuracy of Indirect Branch Prediction via Branch Classification', Technical Report ECE-CEG-98-008, Northeastern University, Boston, Mar. 1998
  17. J. Kalamatianos and D. R. Kaeli, 'Predicting Indirect Branches via Data Compression', 31th Int'l Symp. on Microarchitecture, pp. 272-281, Dallas, U.S.A., Dec. 1998 https://doi.org/10.1109/MICRO.1998.742789
  18. D. Burger and T. M. Austin, 'The SimpleScalar Tool Set, Version 2.0', Technical Report CS-RT-97-1342, University of Wisconsin, Madison, June 1997
  19. R. Nair, 'Dynamic Path-Based Branch Correlation', 28th Int'l Symp. on Micro architecture, pp. 15-23, Ann Arbor, U.S.A., Nov. 1995 https://doi.org/10.1109/MICRO.1995.476809
  20. D. R. Kaeli and P. G. Emma, 'Branch History Table Prediction of Moving Target Branches due to Subroutine Returns', 18th Int'l Symp. on Computer Architecture, pp. 43-42, Toronto, Canada, May 1991 https://doi.org/10.1145/115953.115957
  21. A. Roth, A. Moshovos and G. S. Sohi, 'Improving Virtual Function Call Target Prediction via Dependence-Based Pre- Computation', 13th Int'l Conf. on Super computing, pp. 356-364, Rhodes, Greece, June 1999 https://doi.org/10.1145/305138.305213
  22. O. J. Santana, A. Falcon, E. Fernandez, P. Medina, A. Ramirez and M. Volero, 'A Comprehensive Analysis of Indirect Branch Prediction', 4th Int'l Symp. on High Performance Computing, pp. 133-145, Kansay Science City, Japan, May 2002