Address code and arithmetic optimizations for embedded systems

An important class of problems used widely in both the embedded systems and scientific domains perform memory intensive computations on large data sets. These data sets get to be typically stored in main memory, which means that the compiler needs to generate the address of a memory location in order to store these data elements and generate the same address again when they are subsequently retrieved. This memory address computation is quite expensive, and if it is not performed efficiently, the performance degrades significantly. In this paper, we have developed a new compiler approach for optimizing the memory performance of subscripted or array variables and their address generation in stencil problems that are common in embedded image processing and other applications. Our approach makes use of the observation that in all these stencils, most of the elements accessed are stored close to one other in memory. We try to optimize the stencil codes with a view of reducing both the arithmetic and the address computation overhead. The regularity of the access pattern and the reuse of data elements between successive iterations of the loop body means that there is a common sub-expression between any two successive iterations; these common sub-expressions are difficult to detect using state-of-the-art compiler technology. If we were to store the value of the common sub-expression in a scalar, then for the next iteration, the value in this scalar could be used instead of performing the computation all over again. This greatly reduces the arithmetic overhead. Since we store only one scalar in a register, there is almost no register pressure. Also all array accesses are now replaced by pointer dereferences, where the pointers are incremented after each iteration. This reduces the address computation overhead. Our solution is the only one so far to exploit both scalar conversion and common sub-expressions. Extensive experimental results on several codes show that our approach performs better than the other approaches.

[1]  Francky Catthoor,et al.  Custom Memory Management Methodology: Exploration of Memory Organisation for Embedded Multimedia System Design , 1998 .

[2]  Yanhong A. Liu,et al.  Loop optimization for aggregate array computations , 1998, Proceedings of the 1998 International Conference on Computer Languages (Cat. No.98CB36225).

[3]  Nikil D. Dutt,et al.  Reducing address bus transition for low power memory mapping , 1996, Proceedings ED&TC European Design and Test Conference.

[4]  Hiroshi Nakamura,et al.  Augmenting Loop Tiling with Data Alignment for Improved Cache Performance , 1999, IEEE Trans. Computers.

[5]  Monica S. Lam,et al.  The cache performance and optimizations of blocked algorithms , 1991, ASPLOS IV.

[6]  Nikil D. Dutt,et al.  Memory data organization for improved cache performance in embedded processor applications , 1997, TODE.

[7]  David F. Bacon,et al.  Compiler transformations for high-performance computing , 1994, CSUR.

[8]  Rainer Leupers,et al.  Algorithms for address assignment in DSP code generation , 1996, Proceedings of International Conference on Computer Aided Design.

[9]  Kathryn S. McKinley,et al.  Tile size selection using cache organization and data layout , 1995, PLDI '95.

[10]  Yoshitsugu Araki,et al.  New address-generation-unit architecture for video signal processing , 1991, Other Conferences.

[11]  Francky Catthoor,et al.  Analysis of high-level address code transformations for programmable processors , 2000, DATE '00.

[12]  Michael Wolfe,et al.  More iteration space tiling , 1989, Proceedings of the 1989 ACM/IEEE Conference on Supercomputing (Supercomputing '89).

[13]  Hugo De Man,et al.  System-Level Memory Management for Weakly Parallel Image Processing , 1996, Euro-Par, Vol. II.

[14]  Nikil D. Dutt,et al.  Local memory exploration and optimization in embedded systems , 1999, IEEE Trans. Comput. Aided Des. Integr. Circuits Syst..

[15]  Yanhong A. Liu,et al.  Static caching for incremental computation , 1998, TOPL.

[16]  Chau-Wen Tseng,et al.  Tiling Optimizations for 3D Scientific Computations , 2000, ACM/IEEE SC 2000 Conference (SC'00).

[17]  Hugo De Man,et al.  ADOPT: efficient hardware address generation in distributed memory architectures , 1996, Proceedings of 9th International Symposium on Systems Synthesis.

[18]  Hugo De Man,et al.  High-level address optimization and synthesis techniques for data-transfer-intensive applications , 1998, IEEE Trans. Very Large Scale Integr. Syst..

[19]  David H. Bailey Unfavorable strides in cache memory systems , 1992 .

[20]  David H. Bailey Unfavorable Strides in Cache Memory Systems (RNR Technical Report RNR-92-015) , 1995, Sci. Program..

[21]  Francky Catthoor,et al.  Custom Memory Management Methodology , 1998, Springer US.

[22]  Ken Kennedy,et al.  Improving register allocation for subscripted variables , 1990, PLDI '90.