Home

Optimizing data locality by array restructuring


Author(s) : John Zahorjan John Zahorjan Shun-tak Leung Shun-tak Leung, 
Publisher : N/A
Publication Date : 1995
ISSN : N/A
Abstract : It is increasingly important that optimizing compilers restructure programs for data locality to obtain high performance on today's powerful architectures. In this paper, we focus on array restructuring, a technique that improves the spatial locality exhibited by array accesses in nested loops. Specifically, we address the following question: Given a set of such accesses, how should the array elements be laid out in memory to match the access pattern and thus maximize locality? Our approach is based on an invertible linear transformation of array index vectors. We present algorithms to choose a suitable transformation, and hence array layout, given the set of array accesses. Our analysis places no restrictions on the loop's nesting structure or dependence pattern. Although we focus on cases where the array indexing expressions are affine functions of loop variables, our techniques can be applied to the non-affine case as well. We have implemented our technique in the SUIF compiler [17]. Experimental results show that array restructuring improves loop execution performance substantially, often with no or little runtime overhead. Moreover, the performance improvement of array restructuring compares favorably with that achieved by loop restructuring. 1,