DOI QR코드

DOI QR Code

Register Pressure Aware Code Selection Algorithm for Multi-Output Instructions

Register Pressure를 고려한 다중 출력 명령어를 위한 개선된 코드 생성 방법

  • 윤종희 (강릉원주대학교 컴퓨터공학과) ;
  • 백윤흥 (서울대학교 전기컴퓨터공학부) ;
  • 고광만 (상지대학교 컴퓨터정보공학부)
  • Received : 2011.10.25
  • Accepted : 2011.12.20
  • Published : 2012.02.29

Abstract

The demand for faster execution time and lower energy consumption has compelled architects of embedded processors to customize it to the needs of their target applications. These processors consequently provide a rich set of specialized instructions in order to enable programmers to access these features. Such an instruction is typically a $multi$-$output$ $instruction$ (MOI), which outputs multiple results parallely in order to exploit inherent underlying hardware parallelism. Earlier study has exhibited that MOIs help to enhance performance in aspect of instruction counts and code size. However the earlier algorithm does not consider the register pressure. So, some selected MOIs introduce register spill/reload code that increases the code size and instruction count. To attack this problem, we introduce a novel iterated instruction selection algorithm based on the register pressure of each selected MOIs. The experimental results show the suggested algorithm achieves 3% code-size reduction and 2.7% speed-up on average.

최근 내장형 프로세서가 다양한 휴대 기기에서 사용이 급격히 증가됨에 따라, 빠른 수행 속도와 저전력을 지원하는 내장형 프로세서를 제작하기 위해 대상 응용 프로그램에 최적환 된 설계가 요구되고 있다. 이를 위해, 프로세서들은 다중 출력 명령어형태의, 특별한 명령어들을 추가하고 있다. 여기서 다중 출력 명령어란 다수의 결과값을 병렬적으로 출력하는 명령어를 말한다. 하지만, 이러한 다중 출력 명령어들은 기존 컴파일러에서 생성하지 못하는 문제점이 있다. 그래서, 이를 위한 컴파일 알고리즘이 개발되었지만, 이 알고리즘에서는 register pressure를 고려하지 않아서 최적의 성능을 발휘할 수가 없었다. 본 논문에서는 register pressure를 고려하는 알고리즘을 새롭게 제안하고, 그 결과 기존 알고리즘에 비해서 평균 3%의 코드 사이즈 감소와 2.7% 수행 시간 향상을 더 이룰 수 있었다.

Keywords

References

  1. A. V. Aho, M. Ganapathi, and S. W. K. Tjiang. Code Generation Using Tree Pattern Matching and Dynamic Programing. ACM Transactions on Programming Languages and Systems., 11(4):491-516, Oct., 1989. https://doi.org/10.1145/69558.75700
  2. C. Fraser and D. Hanson. A Retargetable C Compiler : Design and Implementation. Benjamin/Cummings Publishing Co., 1994.
  3. C. Devine. http://xyssl.org, 2007.
  4. Hanno Scharwaechter , Jonghee M. Youn , Rainer Leupers , Yunheung Paek , Gerd Ascheid , Heinrich Meyr, A code-generator generator for multi-output instructions, Proceedings of the 5th IEEE/ACM international conference on Hardware/software codesign and system synthesis, September 30-October 03, 2007, Salzburg, Austria.
  5. C. W. Fraser, D. R. Hanson, and T. A. Proebsting. Engineering Efficient Code Generators Using Tree Matching and Dynamic Programming. Technical Report TR-386-92, 1992.
  6. S. W. K. Tjiang. An Olive Twig. Technical report, Synopsys Inc., 1993.
  7. G. J. Chaitin. Register allocation and spilling via graph coloring. Symposium on Compiler Construction, 17(6):98-105, 1982.
  8. Jonghee M. Youn, Jongwon Lee, Yunheung Paek, Jongeun Lee, Hanno Scharwaechter, Rainer Leupers, Fast graph-based instruction selection for multi-output instructions, Software: Practice and Experience Vol.41, Issue6, pp.717-736, May, 2011. https://doi.org/10.1002/spe.1034
  9. S. Sakai, M.Togasaki, and K. Yamazaki. A Note on Greedy Algorithms for the Maximum Weighted Independent Set Problem. Discrete Applied Mathematics, 126:313-322, 2003. https://doi.org/10.1016/S0166-218X(02)00205-6