Unified Instruction Reordering and Algebraic Transformations for Minimum Cost Offset Assignment
DSP processors have address generation units that can perform address computation in parallel with other operations. This feature reduces explicit address arithmetic instructions, often required to access locations in the stack frame, through auto-increment and decrement addressing modes, thereby decreasing the code size. Decreasing code size in embedded applications is extremely important as it directly impacts the size of on-chip program memory and hence the cost of the system.
Effective utilization of auto-increment and decrement modes requires an intelligent placement of variables in the stack frame which is termed as “offset assignment”. Although a number of algorithms for efficient offset assignment have been proposed in the literature, they do not consider possible instruction reordering to reduce the number of address arithmetic instructions. In this paper, we propose an integrated approach that combines instruction reordering and algebraic transformations to reduce the number of address arithmetic instructions. The proposed approach has been implemented in the SUIF compiler framework. We conducted our experiments on a set of real programs. and compared its performance with that of Liao’s heuristic for Simple Offset Assignment (SOA), Tie-break SOA, Naive offset assignment, and Rao and Pande’s algebraic transformation approach.
KeywordsBasic Block Instruction Sequence Algebraic Transformation Assignment Cost Program Language Design
Unable to display preview. Download preview PDF.
- 1.Aho, A.V., Sethi, R., Ullman, J.D.: Compilers Principles, Techniques and Tools. Addison Weseley, Reading (1988)Google Scholar
- 4.Choi, Y., Kim, T.: Address assignment combined with scheduling in DSP code generation. In: Proc. of the Design Automation Conference, New Orleans, LA (June 2002)Google Scholar
- 5.Lee, C., Potkonjak, M., Mangione-Smith, W.H.: MediaBench: A tool for evaluating and synthesizing multimedia and communication systems. In: Proc. of the 30th Ann. Intl. Symp. on Microarchitecture (MICRO-30), Raleigh, NC (1997)Google Scholar
- 6.Leupers, R., Marwedel, P.: Algorithms for address assignment in DSP code generation. In: Intl. Conf. on Computer Aided Design, San Jose, CA (November 1996)Google Scholar
- 7.Leupers, R., David, F.: A Uniform Optimization technique for Offset Assignment. In: Proc. the 11th International Symposium on System Synthesis (1998)Google Scholar
- 8.Leupers, R.: Code generation for embedded processors. In: Proc. of the 13th Intl. Symp. on System Synthesis (September 2000)Google Scholar
- 9.Liao, S., Devadas, S., Keutzer, K., Tjiang, S., Wang, A.: Storage assignment to decrease code size. In: Proc. of 1995 ACM SIGPLAN Conference on Programming Language Design and Implementation, La Jolla, CA (June 1995)Google Scholar
- 10.Liao, S.: Code Generation and Optimization for Embedded Digital Signal Processors. Ph.D thesis, Department of EECS, Massachusetts Institute of Technology, Cambridge, MA (January 1996)Google Scholar
- 11.Muchnick, S.S.: Advanced Compiler Design and Implementation. Morgan Kauffman Publishers, San Francisco (1997)Google Scholar
- 12.Rao, A., Pande, S.: Storage assignment to generate compact and efficient code on embedded DSPs. In: Proc. 1999 ACM SIGPLAN Conference on Programming Language Design and Implementation, Montreal, Canada (June 1998)Google Scholar
- 13.Rao, A.: Compiler optimizations for storage assignment on embedded DSPs. Master’s Thesis, Dept. of ECECS, Univ. of Cincinnati, OH (October 1998)Google Scholar
- 14.Sarvani, V.V.N.S., Govindarajan, R.: Unified instruction reordering and algebraic transformations for minimum cost offset assignment. In: Student poster session, Programming Languages Design and Implementation, Berlin, Germany (June 2002)Google Scholar
- 15.Stanford University Intermediate Format, http://suif.stanford.edu
- 16.Sudarshanam, A., Malik, S.: Memory bank and register allocation in software synthesis of ASIPs. In: Proc. of 1997 ACM/IEEE Design Automation Conference on Computer-Aided Design, San Jose, CA, November 1997, pp. 388–392 (1997)Google Scholar
- 17.Sudarsanam, A., Liao, S., Devadas, S.: Analysis and evaluation of address arithmetic capabilities in custom DSP architectures. In: Proc. of the 1997 ACM/IEEE Design Automation Conference, Anaheim, CA, June 1997, pp. 297–292 (1997)Google Scholar