DOI QR코드

DOI QR Code

Performance Enhancement of Embedded Software Using Register Promotion

레지스터 프로모션을 이용한 내장형 소프트웨어의 성능 향상

  • 이종열 (전북대학교 전자정보공학부)
  • Published : 2004.10.01

Abstract

In this paper, a register promotion technique 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 promotion 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 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.

이 논문에서는 내장형 소프트웨어의 성능 향상을 위하여 사용될 수 있는 레지스터 프로모션의 새로운 기법을 제안한다. 레지스터 프로모션은 프로그램 내의 메모리 접근 연산(memory access)을 레지스터 접근 연산(register access)으로 바꾸어서 프로그램의 성능 향상을 꾀하는 최적화 방법 중의 하나이다. 제안된 방법에서는 프로파일링(profiling)을 통하여 주어진 소스 코드 내에서의 메모리 접근 연산에 대한 트레이스(trace)를 얻는다. 그리고 각 함수의 수행 횟수에 대한 프로파일링 결과로부터 높은 동적 호출 횟수를 가지는 대상 함수를 선정하여 제안된 레지스터 프로모션 기법을 적용한다. 이와 같이 최적화의 대상이 되는 함수의 수를 줄임으로써 컴파일 시간을 줄일 수 있다. 최적화 대상 함수의 메모리 트레이스를 탐색하여 레지스터 접근 연산으로 변경될 경우 수행 사이클을 줄일 수 있는 메모리 접근 연산을 찾는다. 찾아진 메모리 접근 연산에 대해서는 컴파일러의 중간단계 코드를 수정하여 프로모션 레지스터를 할당한다. 이와 같은 과정을 거쳐 메모리 접근 연산이 프로모션 레지스터에 대한 접근 연산으로 대체되고 이로부터 성능향상을 얻을 수 있다. 제안된 레지스터 프로모션 기법을 ARM과 MCORE 프로세서용 컴파일러에 적용한 후 MediaBench와 DSPStone 벤치마크을 이용하여 실험한 결과 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,' Proceedings of 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,' Proceedings of 8th Int. Symp. On System Synthesis (ISSS), pp.13-15, 1995 https://doi.org/10.1109/ISSS.1995.520610
  3. S. Liao, S. Devadas, K. Keutzer, S. Tjiang, G. Araujo and S. Malik, 'Instruction Selection Using Binate Covering for Code Size Optimization,' Proceedings of Int. Conf. on Computer-Aided Design (ICCAD), pp.5-9, 1995 https://doi.org/10.1109/ICCAD.1995.480146
  4. A. Sudarsanam and S. Malik, 'Memory Bank and Register Allocation in Software Synthesis for ASIPs,' Proceedings of 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 https://doi.org/10.1145/229542.229543
  6. R. Leupers and P. Marwedel, 'Algorithms for Address Assignment in DSP Code Generation,' Proceedings of 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. M. Wolfe, 'High Performance Compilers for Parallel Computing,' Redwood City, CA : Addison-Wesley, 1996
  9. M. hind, 'Pointer Analysis: Haven't We Solved This Problem Yet?,' Proceedings of ACM SIGPLAN - SIGSOFT Workshop on Program Analysis for Software Tools and Engineering (PASTE), pp.54-61, 2001 https://doi.org/10.1145/379605.379665
  10. R. P. Wilson and M. S. Lam, 'Efficient Context-Sensitive Pointer Analysis for C Programs,' Proceedings of SIGPLAN Programming Language Design and Implementation (PLDI), pp.1-12, 1995
  11. R. M. Stallman. Using and Porting GNU CC. [Online], Available, http://gcc.gnu.org/onlinedocs/gcc-2.95.3/gcc.html
  12. Chunho Lee, M. Potkonjak and 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,' Proceedings of Int. Conf. On Signal Processing and Technology, pp.715-720, 1994