Code Size Reduction for Array Intensive Applications on Digital Signal Processors

Optimizing the code size for applications that run on a digital signal processors (DSPs) is a crucial step in generating high-quality and efficient code. Most modern DSP provide multiple address registers and dedicated address generation units that provide address generation in parallel to instruction execution. There is no address computation overhead if the next address is within the auto-modify range of the address register. Many DSP algorithms have an iterative pattern of references to array elements within loops. Thus, a careful assignment of array references to address registers (called the address register allocation or ARA problem) reduces the number of explicit address arithmetic instructions as well as the execution cycles. In this paper, we present an optimal integer linear programming formulation for the address register allocation problem which incorporates code restructuring techniques. In addition, we have developed a Genetic Algorithm solution for the ARA problem that allows us to get near-optimal solutions in a reasonable amount of time for large embedded applications. Results on several benchmarks show the effectiveness of our techniques compared to other techniques in the literature.

[1]  Rainer Leupers,et al.  Code generation for embedded processors , 2000, Proceedings 13th International Symposium on System Synthesis.

[2]  James F. Gimpel,et al.  Covering Points of a Digraph with Point-Disjoint Paths and Its Application to Code Optimization , 1977, JACM.

[3]  J. Ramanujam,et al.  An Effective Heuristic for Simple Offset Assignment with Variable Coalescing , 2006, LCPC.

[4]  Chaitali Chakrabarti,et al.  Address code generation for digital signal processors , 2001, Proceedings of the 38th Design Automation Conference (IEEE Cat. No.01CH37232).

[5]  Amit Rao,et al.  Storage assignment optimizations to generate compact and efficient code on embedded DSPs , 1999, PLDI '99.

[6]  Srinivas Devadas,et al.  Analysis and Evaluation of Address Arithmetic Capabilities in Custom DSP Architectures , 1997, Des. Autom. Embed. Syst..

[7]  Thomas Zeitlhofer,et al.  Optimum address pointer assignment for digital signal processors , 2004, 2004 IEEE International Conference on Acoustics, Speech, and Signal Processing.

[8]  D. H. Bartley,et al.  Optimizing stack frame accesses for processors with restricted addressing modes , 1992, Softw. Pract. Exp..

[9]  Rainer Leupers,et al.  A uniform optimization technique for offset assignment problems , 1998, Proceedings. 11th International Symposium on System Synthesis (Cat. No.98EX210).

[10]  Sharad Malik,et al.  Optimal Live Range Merge for Address Register Allocation in Embedded Programs , 2001, CC.

[11]  Mahmut T. Kandemir,et al.  Improving Offset Assignment for Embedded Processors , 2000, LCPC.

[12]  Kurt Keutzer,et al.  Storage assignment to decrease code size , 1996, TOPL.

[13]  Rainer Leupers,et al.  Optimized array index computation in DSP programs , 1998, Proceedings of 1998 Asia and South Pacific Design Automation Conference.

[14]  Mahmut T. Kandemir,et al.  Optimizing address code generation for array-intensive DSP applications , 2005, International Symposium on Code Generation and Optimization.

[15]  Catherine H. Gebotys DSP address optimization using a minimum cost circulation technique , 1997, ICCAD 1997.

[16]  Rainer Leupers,et al.  Offset assignment using simultaneous variable coalescing , 2006, TECS.

[17]  Constantinos E. Goutis,et al.  Code Transformations for Embedded Multimedia Applications: Impact on Power and Performance , 1998, ISCA 1998.

[18]  Rainer Leupers,et al.  Array index allocation under register constraints in DSP programs , 1999, Proceedings Twelfth International Conference on VLSI Design. (Cat. No.PR00013).

[19]  B. Wess,et al.  Optimal DSP memory layout generation as a quadratic assignment problem , 1997, Proceedings of 1997 IEEE International Symposium on Circuits and Systems. Circuits and Systems in the Information Age ISCAS '97.

[20]  Santosh Pande,et al.  Storage assignment optimizations through variable coalescence for embedded processors , 2003, LCTES '03.

[21]  Richard M. Karp,et al.  A n^5/2 Algorithm for Maximum Matchings in Bipartite Graphs , 1971, SWAT.

[22]  Sharad Malik,et al.  Register Allocation for Indirect Addressing in Loops Register Allocation for Indirect Addressing in Loops , 1998 .

[23]  Rajiv Gupta,et al.  Simple offset assignment in presence of subword data , 2003, CASES '03.