Abstract
Exploitation of address generation units which are typically provided in DSPs plays an important role in DSP code generation since that perform fast address computation in parallel to the central data path. Offset assignment is optimization of memory layout for program variables by taking advantage of the capabilities of address generation units, consists of memory layout generation and address pointer assignment steps. In this paper, we propose an effective address pointer assignment method to minimize the number of address calculation instructions in DSP code generation. The proposed approach reduces the time complexity of a conventional address pointer assignment algorithm with fixed memory layouts by using minimum cost-nodes breaking. In order to contract memory size and processing time, we employ a powerful pruning technique. Moreover our proposed approach improves the initial solution iteratively by changing the memory layout for each iteration because the memory layout affects the result of the address pointer assignment algorithm. We applied the proposed approach to about 3,000 sequences of the OffsetStone benchmarks to demonstrate the effectiveness of the our approach. Experimental results with benchmarks show an average improvement of 25.9% in the address codes over previous works.
DSP에서 제공되는 주소 생성 유닛은 데이터 패스와 병렬적으로 주소 연산을 수행할 수 있게 해 줌으로써, DSP 코드 생성에 중요한 역할을 한다. 프로그램 변수들의 메모리 레이아웃을 결정하는 문제는 주소 생성 유닛의 기능을 이용하여 주소 연산용 명령어를 줄이는 최적화이다. 메모리 레이아웃 생성 단계와 주소 포인터 할당 단계로 구분 되는 이 최적화에서 본 논문은 주소 연산 코드의 수가 최소가 되도록 DSP용 코드 생성의 효과적인 주소 포인터 할당 문제를 다룬다. 제안하는 알고리즘은 고정된 메모리 레이아웃을 가질 때 주소 포인터 할당을 수행하는 기존의 알고리즘의 시간 복잡도를 줄이는 기법이다. 메모리 크기와 수행 시간을 줄이기 위해 알고리즘을 수행할 때 핵심적인 요소들만을 고려하도록 강한 가지치기 방법을 사용하였다. 또한 주소 포인터 할당 문제는 메모리 레이아웃에 영향을 크게 받는 문제이기 때문에 본 논문은 주어진 메모리 레이아웃을 갱신하여 반복적으로 성능을 개선하는 방법을 제안한다. 약 3,000여개의 실제 프로그램으로부터 얻은 변수 접근 시퀀스를 제공하는 OffsetStone 벤치마크를 이용한 실험결과를 통해 본 논문에서 제안한 기법과 알고리즘을 테스트 했다. 제안한 방법은 전통적인 방법보다 평균 25.9%의 적은 주소 코드를 생성해 냄을 보인다.