Optimizing aggregate array computations in loops

被引:17
作者
Liu, YA [1 ]
Stoller, SD
Li, N
Rothamel, T
机构
[1] SUNY Stony Brook, Dept Comp Sci, Stony Brook, NY 11794 USA
[2] IBM Almaden, San Jose, CA 95120 USA
来源
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS | 2005年 / 27卷 / 01期
关键词
D O I
10.1145/1053468.1053471
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
An aggregate array computation is a loop that computes accumulated quantities over array elements. Such computations are common in programs that use arrays, and the array elements involved in such computations often overlap, especially across iterations of loops, resulting in significant redundancy in the overall computations. This article presents a method and algorithms that eliminate such overlapping aggregate array redundancies and shows analytical and experimental performance improvements. The method is based on incrementalization, that is, updating the values of aggregate array computations from iteration to iteration rather than computing them from scratch in each iteration. This involves maintaining additional values not maintained in the original program. We reduce various analysis problems to solving inequality constraints on loop variables and array subscripts, and we apply results from work on array data dependence analysis. For aggregate array computations that have significant redundancy; incrementalization produces drastic speedup compared to previous optimizations; when there is little redundancy, the benefit might be offset by cache effects and other factors. Previous methods for loop optimizations of arrays do not perform incrementalization, and previous techniques for loop incrementalization do not handle arrays.
引用
收藏
页码:91 / 125
页数:35
相关论文
共 67 条
[1]   Synthesizing transformations for locality enhancement of imperfectly-nested loop nests [J].
Ahmed, N ;
Mateev, N ;
Pingali, K .
INTERNATIONAL JOURNAL OF PARALLEL PROGRAMMING, 2001, 29 (05) :493-544
[2]   Software pipelining [J].
Allan, VH ;
Jones, RB ;
Lee, RM ;
Allan, SJ .
ACM COMPUTING SURVEYS, 1995, 27 (03) :367-432
[3]  
Allen F., 1971, Design and Optimization of Compilers, P1
[4]  
ALLEN JR, 1983, THESIS RICE U
[5]  
BANERJEE U, 1990, P WORKSH ADV LANG CO, P192
[6]   FORMAL PROGRAM CONSTRUCTION BY TRANSFORMATIONS - COMPUTER-AIDED, INTUITION-GUIDED PROGRAMMING [J].
BAUER, FL ;
MOLLER, B ;
PARTSCH, H ;
PEPPER, P .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1989, 15 (02) :165-180
[7]  
BIRD RS, 1984, ACM T PROGR LANG SYS, V6, P487, DOI 10.1145/1780.1781
[8]  
BOOTH R, 1997, INNER LOOPS
[9]  
BROMLEY M, 1991, P ACM SIGPLAN 91 C P, P145
[10]  
BROY M, 1984, PROGRAM TRANSFORMATI, P199