Prediction Accuracy Enhancement of Function Return Address via RAS Pollution Prevention

RAS 오염 방지를 통한 함수 복귀 예측 정확도 향상

  • 김주환 (삼성전자 SOC 개발실) ;
  • 곽종욱 (영남대학교 컴퓨터공학과) ;
  • 장성태 (수원대학교 컴퓨터학과) ;
  • 전주식 (서울대학교 컴퓨터공학부)
  • Received : 2010.12.16
  • Accepted : 2011.05.12
  • Published : 2011.05.25

Abstract

As the prediction accuracy of conditional branch instruction is increased highly, the importance of prediction accuracy for unconditional branch instruction is also increased accordingly. Except the case of RAS(Return Address Stack) overflow, the prediction accuracy of function return address should be 100% theoretically. However, there exist some possibilities of miss-predictions for RAS return addresses, when miss-speculative execution paths are invalidated, in case of modern speculative microprocessor environments. In this paper, we propose the RAS rename technique to prevent RAS pollution, results in the reduction of RAS miss-prediction. We divide a RAS stack into a soft-stack and a hard-stack and we handle the instructions for speculative execution in the soft-stack. When some overwrites happen in the soft-stack, we move the soft-stack data into the hard-stack. In addition, we propose an enhanced version of RAS rename scheme. In simulation results, our solution provide 1/90 reduction of miss-prediction of function return address, results in up to 6.85% IPC improvement, compared to normal RAS method. Furthermore, it reduce miss-prediction ratio as 1/9, compared to previous technique.

조건 분기 명령어의 예측 정확도가 매우 높아짐에 따라 상대적으로 무조건 분기 명령어의 예측이 중요해지고 있다. 그 중 RAS(Return Address Stack)를 사용하는 함수 복귀 예측은 이론적으로 오버플로가 발생하지 않는 한도 내에서 100%의 정확도를 보여야 한다. 하지만 투기적 실행을 지원하는 현대 마이크로프로세서 환경 하에서는 잘못된 실행 경로로의 수행 결과를 무효화 할 때 RAS의 오염이 발생하며, 이는 함수 복귀 주소의 예측 실패로 이어진다. 본 논문에서는 이러한 RAS의 오염을 방지하기 위하여 RAS 재명명 기법을 제안한다. RAS 재명명 기법은 RAS의 스택을 소프트 스택과 하드 스택으로 나누어 투기적 실행에 의한 데이터의 변경을 복구할 수 있는 소프트 스택에서 투기적 실행에 의한 데이터를 관리하고, 소프트 스택의 크기 제한으로 겹쳐쓰기가 일어나는 데이터 중 이후에 사용될 데이터를 하드 스택으로 옮기는 구조로 구성된다. 또한 이러한 구조의 문제점을 파악하여, 본 논문에서는 RAS 재명명 기법의 추가적 개선법을 소개한다. 제안된 기법을 모의실험 한 결과, RAS 오염 방지 기법이 적용되지 않은 시스템과 비교하여 함수 복귀 예측 실패를 약 1/90로 감소시켰으며, 최대 6.95%의 IPC 향상을 가져왔다. 또한 기존의 RAS 오염 방지 기법이 적용된 시스템과 비교하여 함수 복귀 예측 실패를 약 1/9로 감소 시켰다.

Keywords

References

  1. D. A. Patterson and J. L. Hennessy, "Computer architecture: a quantitative approach", Morgan Kaufman, 2007, 4th Edition.
  2. E. Sprangle and D. Carmean, "Increasing processor performance by implementing deeper pipelines", In Proc. 29th Int'l Symp. on Computer Architecture, pp.25-34, 2002.
  3. G. H. Loh, "Revisiting the Performance Impact of Branch Predictor Latencies", IEEE International Symposium on Performance Analysis of Systems and Software, pp. 59-69, 2006.
  4. H. Gao and H. Zhou, "PMPM: Prediction by Combining Multiple Partial Matches" , Journal of Instruction-Level Parallelism, Vol. 9, May, 2007.
  5. Y. Ishii, "Fused Two-Level Branch Prediction with Ahead Calculation", Journal of Instruction-Level Parallelism, Vol. 9, May, 2007.
  6. D. Jimenez, "Piecewise liner branch prediction" In Proceedings of the 36th Annual IEEE/ACM International Symposium on Microarchitecture, Dec, 2003.
  7. A. Seznec, "The L-TAGE Branch Predictor", Journal of Instruction-Level Parallelism, Vol. 9, May, 2007.
  8. K. Aasaraai, A. Baniasadi and E. Atoofian, "Computational and storage power optimizations for the O-GEHL branch predictor", Proceedings of the 4th international conference on Computing frontiers, pp. 105-112, May, 2007.
  9. H. Vandierendonck and A. Seznec, "Speculative return address stack management revisited", ACM Transactions on Architecture and Code Optimization (TACO), Volume 5 Issue 3, November 2008.
  10. H. Kim, J. A. Joao, O. Mutlu, C. J. Lee, Y. N. Patt and R. Cohn, "VPC prediction: reducing the cost of indirect branches via hardware-based dynamic devirtualization", Proceedings of the 34th annual international symposium on Compoter architecture, pp. 424-435, 2007.
  11. G. Lee, Y. Shi and H. Lin, "Indirect Branch Validation Unit", Microprocessors and Microsystems, Vol. 33, Issues 7-8, pp. 461-468, October-November 2009. https://doi.org/10.1016/j.micpro.2009.09.002
  12. K. Skadron, P. S. Ahuja, M. Martonosi, D. W. Clark, "Improving prediction for procedure returns with return-address-stack repair mechanisms", Proceedings of the 31st annual ACM/IEEE international symposium on Microarchitecture, p.259-271, November 1998.
  13. S. Jourdan, T.-H. Hsing, J. Stark, Y. N. Patt, "The Effects of Mispredicted-Path Execution on Branch Prediction Structures", Proceedings of the 1996 Conference on Parallel Architectures and Compilation Techniques, p.58, October 20-23, 1996.
  14. G.-Y. Chiu, H.-C. Yang, W. Y.-H. Li, Chung-Ping Chung, "Mechanism for return stack and branch history corrections under misprediction in deep pipeline design", Computer Systems Architecture Conference, p.1-8, 2008.
  15. J. H. Kim, J. W. Kwak, S. Yang, S. Y. Shin and C. S. Jhon, "Branch Pre-Prediction: A Method for Hiding Branch Prediction Latency", Information an International Interdisciplinary journal, vol. 13, No. 2, 2010.
  16. T.-Y. Yeh, "Return address predictor that uses branch instructions to track a last valid return address", United State Patent Number 6,253,315. June 2001.
  17. V. Desmet, Y. Sazeides, C. Kourouyiannis and K. D. Bosschere, "Correct alignment of a return-address-stack after call and return mispredictions", In Workshop on Duplicating, Deconstructing and Debunking. 25--33., 2005.
  18. D. Burger, T. M. Austin and S. Bennett, "Evaluating future micro-processors: the SimpleScalar tool set", Tech. Report TR-1308, Univ. of Wisconin-madison Computer Science Dept., 1997.
  19. S. McFarling, "Combining branch predictors. Tech. Rep. TN-36m", Digital Western Research Lab., June, 1993.
  20. SPEC CPU Benchmarks, http://www.specbench.org