A New Register Allocation Technique for Performance Enhancement of Embedded Software

내장형 소프트웨어의 성능 향상을 위한 새로운 레지스터 할당 기법

  • Jong-Yeol, Lee (Division of Electronics and Information, Chonbuk National University)
  • Published : 2004.10.01

Abstract

In this paper, a register allocation techlique that translates memory accesses to register accesses Is presented to enhance embedded software performance. In the proposed method, a source code is profiled to generate a memory trace. From the profiling results, target functions with high dynamic call counts are selected, and the proposed register allocation technique is applied only to the target functions to save the compilation time. The memory trace of the target functions is searched for the memory accesses that result in cycle count reduction when replaced by register accesses, and they are translated to register accesses by modifying the intermediate code and allocating Promotion registers. The experiments where the performance is measured in terms of the cycle count on MediaBench and DSPstone benchmark programs show that the proposed method increases the performance by 14% and 18% on the average for ARM and MCORE, respectively.

본 논문에서는 메모리 접근 연산을 레지스터 접근 연산으로 변환함으로써 레지스터를 할당하여 내장형 소프트웨어의 성능 향상을 도모할 수 있는 위한 레지스터 할당 기법을 제안한다. 제안된 방법에서는 프로파일링(Profiling)을 통하여 메모리 트레이스(trace)를 얻는다. 그리고 각 함수의 수행 횟수에 대한 프로파일링 결과로부터 높은 동적 호출 횟수를 가지는 대상 함수를 선정하여 제안된 레지스터 할당 기법을 적용한다. 이와 같이 최적화의 대상이 되는 함수의 수를 줄임으로써 전체적인 컴파일 시간을 줄일 수 있다. 최적화대상 함수의 메모리 트레이스를 탐색하여 레지스터 접근 연산으로 변경될 경우 수행 사이클을 줄일 수 있는 메모리 접근 연산을 찾는다. 찾아진 메모리 접근 연산에 대해서는 컴파일러의 중간단계 코드를 수정하여 프로모션 레지스터(promotion register)를 할당한다. 이와 같은 과정을 거쳐 메모리 접근 연산이 프로모션 레지스터에 대한 접근 연산으로 대체되고 이로부터 성능향상을 얻을 수 있다. 제안된 레지스터 프로모션 기법을 ARM과 MCORE 프로세서용 컴파일러에 적용한 후 MediaBench와 DSPStone 벤치마크를 이용하여 cycle count를 비교함으로써 성능을 측정하였다. 그 결과 ARM과 MCORE에 대하여 평균 14%와 18%의 성능향상을 얻을 수 있었다.

Keywords

References

  1. C. Liem, T. May, and P. Paulin, 'Instruction-Set Matching and Selection for DSP and ASIP Code Generation,' In European Design and Test Conference ED & TC), pp. 31-37, 1994 https://doi.org/10.1109/EDTC.1994.326902
  2. G. Araujo and S. Malik, 'Optimal Code Generation for Embedded Memory Non-Homogeneous Register Architecture,' In 8th Int. Symp. On System Synthesis, pp. 13-15, 1995 https://doi.org/10.1145/224486.224493
  3. S. Liao, S. Devadas, K. Keutzer, and S. Tjiang, G. Araujo and S. Malik, 'Instruction Selection Using Binate Covering for Code Size Optimization,' In Int. Conf. on Computer-Aided Design (ICCAD), pp. 5-9, 1995
  4. A. Sudarsanam and S. Malik, 'Memory Bank and Register Allocation in Software Synthesis for ASIPs,' In Int. Conf. on Computer-Aided Design (ICCAD), pp. 393-399, 1995 https://doi.org/10.1109/ICCAD.1995.480145
  5. S. Liao, S. Devadas, K. Keutzer, S. Tjiang, and A. Wang, 'Storage Assignment to decrease code size', ACM Trans. Program Lang. and Sys. vol. 18, no. 3, pp, 186-195, May 1996
  6. R. Leupers and P. Marwedel, 'Algorithms for Address Assignment in DSP Code Generation,' In Int. Conf. on Computer-Aided Design (ICCAD), pp. 109-112, 1996 https://doi.org/10.1109/ICCAD.1996.569409
  7. A. Aho, R. Sethi, and J. Ullman, Compilers -Principles, Techniques, and Tools. Reading, MA: Addison-Wesley, 1986
  8. R. M. Stallman. Using and Porting GNU CC. [Online]. Available: http://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc.html
  9. M. Wolfe, High Performance Compilers for Parallel Computing. Redwood City, CA: Addison -Wesley, 1996
  10. M. hind, 'Pointer Analysis: Haven't We Solved This Problem Yet?' In PASTE, pp. 54-61, 2001
  11. R. P. Wilson and M. S. Lam, 'Efficient Contex -Sensitive Pointer Analysis for C Programs,' In SIGPLAN PLDI, pp. 1-12, 1995
  12. Chunho Lee, M. Potkonjak, W. H. Mangione -Smith, MediaBench. [Online], Available: http://www.cs.ucla.edu/leec/mediabench/
  13. V. Zivojnovici, J. Martinez Velarde, and C. Schlager, 'DSPstone : A DSP-oriented Benchmarking Methodology,' In Proc. Int. Conf. On Signal Processing and Technology, Dallas, pp. 715-720, 1994