분기 히스토리의 모험적 갱신을 허용하는 전역 히스토리 기반 분기예측기에서 분기예측실패를 위한 간단한 복구 메커니즘

Simple Recovery Mechanism for Branch Misprediction in Global-History-Based Branch Predictors Allowing the Speculative Update of Branch History

  • 고광현 (국립한국농업전문학교) ;
  • 조영일 (수원대학교 컴퓨터학과)
  • 발행 : 2005.06.01

초록

조건 분기예측은 프로세서 성능 개선을 위한 중요한 기술이다 그러나, 분기예측실패는 많은 사이클을 낭비시키며, 비순서적 실행을 방해하고, 잘못 예측된 명령어들을 수행하게 되므로 전력을 낭비한다. 따라서 높은 정확도를 갖는 분기 예측기는 좋은 성능을 갖는 프로세서를 위해 중요하다. gshare와 GAg같은 전역 히스토리를 기반으로 하는 예측기에서는 히스토리의 명령어 완료시간 갱신 (commit update)에 의해 많은 분기예측실패가 발생한다. 그런 문제를 해결하기 위해 히스토리를 모험적으로 갱신하고, 분기예측실패 시 히스토리를 복구시키는 메커니즘에 관한 연구의 필요성이 제시되었고, 연구 되었다. 본 논문에서는 분기예측실패 발생 후 분기 히스토리를 복구하는 간단한 복구 메커니즘을 제안한다. 제안한 복구 메커니즘은 기존 분기예측기에 age_counter를 추가하고 분기 히스토리 레지스터 크기를 2배로 확장시킨다. age_counter는 미해결 분기명령어 수를 저장하며, 분기예측실패 후 분기 히스토리 레지스터를 복구하는데 사용한다. Simplescalar 3.0/PISA 툴셋과 SPECINT95 벤치마크 프로그램에서 시뮬레이션 한 결과, 제안된 복구 메커니즘을 gshare와 GAg 예측기에 적용하였을 때 예측 정확도와 프로세서 성능을 개선시킬 수 있었음 을 보여준다. GAg와 gshare 예측기에서 예측정확도는 각각 9.21$\%$와 2.14$\%$가 개선되었고, WC는 18.08$\%$와 8.75$\%$ 개선되었다.

Conditional branch prediction is an important technique for improving processor performance. Branch mispredictions, however, waste a large number of cycles, inhibit out-of-order execution, and waste electric power on mis-speculated instructions. Hence, the branch predictor with higher accuracy is necessary for good processor performance. In global-history-based predictors like gshare and GAg, many mispredictions come from commit update of the history. Some works on this subject have discussed the need for speculative update of the history and recovery mechanisms for branch mispredictions. In this paper, we present a simple mechanism for recovering the branch history after a misprediction. The proposed mechanism adds an age_counter to the original predictor and doubles the size of the branch history register. The age_counter counts the number of outstanding branches and uses it to recover the branch history register. Simulation results on the Simplescalar 3.0/PISA tool set and the SPECINTgS benchmarks show that gshare and GAg with the proposed recovery mechanism improved the average prediction accuracy by 2.14$\%$ and 9.21$\%$, respectively and the average IPC by 8.75$\%$ and 18.08$\%$, respectively over the original predictor.

키워드

참고문헌

  1. T.-Y. Yeh and Y. N. Patt, 'Alternative implementations of two-level adaptive branch prediction,' in Proceedings of the 19th Annual International Symposium on Computer Architecture, pp. 124-34, May 1992 https://doi.org/10.1145/139669.139709
  2. K. Diefendorff, 'K7 challenges Intel,' Microprocessor Report, pp. 1, 6-11, Oct. 26 1998
  3. R. E. Kessler, E. J. McLellan, and D. A. Webb, 'The Alpha 21264 microprocessor architecture,' in Proceedings of the 1998 International Conference on Computer Design, pp. 90-95, Oct. 1998 https://doi.org/10.1109/ICCD.1998.727028
  4. G.H. Loh, D.S. Henry, 'Predicting Conditional Branches with Fusion-based Hybrid Predictors,' PACT2002, pp 395-405, Sep. 2002 https://doi.org/10.1109/PACT.2002.1106015
  5. Z. Lu, J. Lach, M. Stan, and K. Skadron. 'Alloyed Branch History: Combining Global and Local Branch History for Robust Performance,' International Journal of Parallel Programming, Kluuier, volume 31, number 2, Apr. 2003 https://doi.org/10.1023/A:1022669325321
  6. A. R. Talcott, W. Yamamoto, M. J. Serrano, R. C. Wood, and M. Nemirovsky, 'The impact of unresolved branches on branch prediction scheme performance,' in Proceedings of the 21st Annual International Symposium on Computer Architecture, pp. 12-21, Apr. 1994 https://doi.org/10.1145/191995.192013
  7. E. Hao, P.-Y. Chang, and Y. Patt, 'The effect of speculatively updating branch history on branch prediction accuracy, revisited,' in Proceedings of the 27th Annual International Symposium on Microarchitecture, pp. 228-32, Nov. 1994 https://doi.org/10.1145/192724.192756
  8. M. Evers, S. J. Patel, R. S. Chappell, and Y. N. Patt, 'An analysis of correlation and predictability: What makes two-level branch predictors work,' in Proceedings of the 25th Annual International Symposium On Computer Architecture, pp. 52-61, June 1998 https://doi.org/10.1109/ISCA.1998.694762
  9. K. Skadron, and M. Martonosi, 'Speculative Updates of Local and Global Branch History: A Quantitative Analysis,' JILP Vol. 2, Jan. 2000
  10. S. Jourdan, J. Stark, T.-H. Hsing, and Y. N. Patt, 'Recovery requirements of branch prediction storage structures in the presence of mispredicted-path execution,' International Journal of Parallel Programming, vol. 25, pp. 363-83, Oct. 1997 https://doi.org/10.1007/BF02699883
  11. K. Skadron, P. S. Ahuja, M. Martonosi, and D. W. Clark, 'Improving prediction for procedure returns with return-address-stack repair mechanisms,' in Proceedings of the 31st Annual ACM/IEEE International Symposium on Microarchitecture, pp. 259-71, Dec. 1998 https://doi.org/10.1109/MICRO.1998.742787
  12. D. Burger, T. M. Austin, and S. Bennett, 'Evaluating future microprocessors: the SimpleScalar tool set,' Tech Report TR-1308, University of Wisconsin-Madison Computer Sciences Department, July 1996
  13. The Standard Performance Evaluation Corporation, 'SPEC CPU95 Benchmarks,' WWW site: http://www.specbench.org/osg/cpu95, Dec. 1999