## Loop optimization for aggregate array computations

### Cached

### Download Links

Citations: | 15 - 7 self |

### BibTeX

@MISC{Liu_loopoptimization,

author = {Yanhong A. Liu and Scott D. Stoller},

title = {Loop optimization for aggregate array computations },

year = {}

}

### Years of Citing Articles

### OpenURL

### Abstract

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 signi cant redundancy in the overall computation. This paper presents a method and algorithms that eliminate such overlapping aggregate array redundancies and shows both analytical and experimental performance improvements. The method is based on incrementalization, i.e., updating the values of aggregate array computations from iteration to iteration rather than computing them from scratch in each iteration. This involves maintaining additional information 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. Incrementalizing aggregate array computations produces drastic program speedup compared to previous optimizations. Previous methods for loop optimizations of arrays do not perform incrementalization, and previous techniques for loop incrementalization do not handle arrays.

### Citations

1399 |
A Discipline of Programming
- Dijkstra
- 1976
(Show Context)
Citation Context ...regate array computations can be automated and requires no user intervention or annotations. Our method for maintaining additional information is an automatic method for strengthening loop invariants =-=[16, 33, 34, 61]-=-. Our optimizations are based on the idea of explicit incremental computation, for which a general systematic transformational approach has been studied and formulated for a functional language [43, 4... |

570 | A Transformation System for Developing Recursive Programs
- Burstall, Darlington
- 1976
(Show Context)
Citation Context ...ion exploits subcomputations whose values can be efficiently updated, in addition to directly reused, from one iteration to the next. Thus, it allows far more speedup. General program transformations =-=[12, 38]-=- can be used for optimization, as demonstrated in projects like CIP [8, 11, 55]. In contrast to such manual or semi-automatic approaches, our optimization of aggregate array computations can be automa... |

466 |
The Science of Programming
- Gries
- 1981
(Show Context)
Citation Context ...regate array computations can be automated and requires no user intervention or annotations. Our method for maintaining additional information is an automatic method for strengthening loop invariants =-=[16, 33, 34, 61]-=-. Our optimizations are based on the idea of explicit incremental computation, for which a general systematic transformational approach has been studied and formulated for a functional language [43, 4... |

448 | The omega test: a fast and practical integer programming algorithm for dependence analysis
- Pugh
- 1993
(Show Context)
Citation Context ...e latter case, resource requirements and communication costs are substantially reduced. Additionally, for this powerful optimization, we make use of techniques and tools for array dependence analysis =-=[18, 19, 41, 42, 50, 51, 52]-=- and sourceto -source transformation [5, 34, 42, 49, 54] that were developed for parallelizing compilers. Comparing the straightforward program (1) with the optimized program (24) on page 8, one can s... |

210 | Dataflow analysis of array and scalar references
- Feautrier
- 1991
(Show Context)
Citation Context ...e latter case, resource requirements and communication costs are substantially reduced. Additionally, for this powerful optimization, we make use of techniques and tools for array dependence analysis =-=[20, 21, 48, 50, 57, 58, 59, 60]-=- and source-to-source transformation [7, 39, 50, 56, 62] that were developed for parallelizing compilers. This paper is organized as follows. Section 2 gives the programming language. Sections 3 descr... |

185 | A general approach for run-time specialization and its application to C
- Consel, Noel
- 1996
(Show Context)
Citation Context ...ementally using previous pieces and thus cannot produce as much speedup as our method can. Specialization techniques, such as data specialization [35, 40], run-time specialization and code generation =-=[15, 41, 42]-=-, and dynamic compilation and code generation [6, 18], have been used in 16 program optimizations and achieved certain large speedups. These optimizations allow subcomputations repeated on fixed dynam... |

168 |
Unimodular transformations of double loops
- Banerjee
- 1990
(Show Context)
Citation Context ... on arrays. At the same time, many optimizations have been studied for arrays, such as various APL compiler optimizations [26, 36, 49], loop fusion [3, 5, 29, 66], pipelining [2], and loop reordering =-=[7, 39, 50, 56, 62]-=-, but none of them achieves incrementalization. This paper presents a method and algorithms for incrementalizing aggregate array computations. The method is composed of algorithms for four major probl... |

165 | Parametric integer programming
- Feautrier
- 1988
(Show Context)
Citation Context ...e latter case, resource requirements and communication costs are substantially reduced. Additionally, for this powerful optimization, we make use of techniques and tools for array dependence analysis =-=[20, 21, 48, 50, 57, 58, 59, 60]-=- and source-to-source transformation [7, 39, 50, 56, 62] that were developed for parallelizing compilers. This paper is organized as follows. Section 2 gives the programming language. Sections 3 descr... |

156 | Optimizing ml with run-time code generation
- Leone, Lee
- 1995
(Show Context)
Citation Context ...incrementally using previous pieces and thus cannot produce as much speedup as our method can. Specialization techniques, such as data specializations[35], run-time specialization and code generation =-=[13, 36]-=-, and dynamic compilation and code generation [4, 16], have been used in program optimizations and achieved certain large speedups. These optimizations allow subcomputations repeated on fixed dynamic ... |

111 |
Finite Differencing of Computable Expressions
- Paige, Koenig
- 1982
(Show Context)
Citation Context ...lications are facing, yet methods for eliminating overlapping aggregate array redundancy have been lacking. Optimizations similar to incrementalization have been studied for various language features =-=[7, 12, 28, 38, 39, 40, 43, 45, 44, 55, 63]-=-, but no systematic technique handles aggregate computations on arrays. At the same time, many optimizations have been studied for arrays [1, 2, 3, 5, 24, 26, 31, 34, 42, 49, 54, 58], but none of them... |

100 |
effective dynamic compilation
- Fast
(Show Context)
Citation Context ... much speedup as our method can. Specialization techniques, such as data specialization [35, 40], run-time specialization and code generation [15, 41, 42], and dynamic compilation and code generation =-=[6, 18]-=-, have been used in 16 program optimizations and achieved certain large speedups. These optimizations allow subcomputations repeated on fixed dynamic values to be computed once and reused in loops or ... |

99 |
A Catalogue of Optimization Transformations
- Allen, Cocke
- 1972
(Show Context)
Citation Context ... systematic technique handles aggregate computations on arrays. At the same time, many optimizations have been studied for arrays, such as various APL compiler optimizations [26, 36, 49], loop fusion =-=[3, 5, 29, 66]-=-, pipelining [2], and loop reordering [7, 39, 50, 56, 62], but none of them achieves incrementalization. This paper presents a method and algorithms for incrementalizing aggregate array computations. ... |

90 |
Array dataflow analysis and its use in array privatization
- Maydan, Amarasinghe, et al.
- 1993
(Show Context)
Citation Context ... language features [7, 12, 28, 38, 39, 40, 43, 45, 44, 55, 63], but no systematic technique handles aggregate computations on arrays. At the same time, many optimizations have been studied for arrays =-=[1, 2, 3, 5, 24, 26, 31, 34, 42, 49, 54, 58]-=-, but none of them achieves incrementalization. This paper presents a method and algorithms for incrementalizing aggregate array computations. The method is composed of algorithms for four major probl... |

87 |
Dependence analysis for subscripted variables and its application to program transformations
- ALLEN
(Show Context)
Citation Context ... systematic technique handles aggregate computations on arrays. At the same time, many optimizations have been studied for arrays, such as various APL compiler optimizations [26, 36, 49], loop fusion =-=[3, 5, 29, 66]-=-, pipelining [2], and loop reordering [7, 39, 50, 56, 62], but none of them achieves incrementalization. This paper presents a method and algorithms for incrementalizing aggregate array computations. ... |

87 |
The Promotion and Accumulation Strategies in Transformational Programming
- Bird
- 1984
(Show Context)
Citation Context ...etic operations [4, 14, 31, 32], finite differencing of set and bag operations [51, 52, 54, 53, 72], and promotion-and-accumulation, finite differencing, and incrementalization of recursive functions =-=[9, 43, 45, 46, 47, 63]-=-, but no systematic technique handles aggregate computations on arrays. At the same time, many optimizations have been studied for arrays, such as various APL compiler optimizations [26, 36, 49], loop... |

80 | An exact method for the analysis of value-based array data dependences
- PUGH, WONNACOTT
- 1993
(Show Context)
Citation Context ...e latter case, resource requirements and communication costs are substantially reduced. Additionally, for this powerful optimization, we make use of techniques and tools for array dependence analysis =-=[18, 19, 41, 42, 50, 51, 52]-=- and sourceto -source transformation [5, 34, 42, 49, 54] that were developed for parallelizing compilers. Comparing the straightforward program (1) with the optimized program (24) on page 8, one can s... |

73 |
Reduction of operator strength
- Allen, Cooke, et al.
- 1981
(Show Context)
Citation Context ...rlapping aggregate array redundancy have been lacking. Optimizations similar to incrementalization have been studied for various language features, such as strength reduction of arithmetic operations =-=[4, 14, 31, 32]-=-, finite differencing of set and bag operations [51, 52, 54, 53, 72], and promotion-and-accumulation, finite differencing, and incrementalization of recursive functions [9, 43, 45, 46, 47, 63], but no... |

60 |
Safe fusion of functional expressions
- Chin
- 1992
(Show Context)
Citation Context ... in a piece-wise and on-demand fashion, avoiding unnecessary storage of large intermediate results in sequences of operations [26, 36, 49, 70]. The same basic idea underlies techniques such as fusion =-=[3, 5, 13, 29, 66]-=-, deforestation [65], and transformation of series expressions [67, 68]. These optimizations do not aim to compute each piece of the aggregate operations incrementally using previous pieces and thus c... |

48 | Specializing shaders
- Guenter, Knoblock, et al.
- 1995
(Show Context)
Citation Context ...to compute each piece of the aggregate operations incrementally using previous pieces and thus cannot produce as much speedup as our method can. Specialization techniques, such as data specialization =-=[35, 40]-=-, run-time specialization and code generation [15, 41, 42], and dynamic compilation and code generation [6, 18], have been used in 16 program optimizations and achieved certain large speedups. These o... |

46 | Static caching for incremental computation
- Liu, Stoller, et al.
- 1998
(Show Context)
Citation Context ...lications are facing, yet methods for eliminating overlapping aggregate array redundancy have been lacking. Optimizations similar to incrementalization have been studied for various language features =-=[7, 12, 28, 38, 39, 40, 43, 45, 44, 55, 63]-=-, but no systematic technique handles aggregate computations on arrays. At the same time, many optimizations have been studied for arrays [1, 2, 3, 5, 24, 26, 31, 34, 42, 49, 54, 58], but none of them... |

42 | Data specialization
- KNOBLOCK, RUF
- 1996
(Show Context)
Citation Context ...to compute each piece of the aggregate operations incrementally using previous pieces and thus cannot produce as much speedup as our method can. Specialization techniques, such as data specializations=-=[35]-=-, run-time specialization and code generation [13, 36], and dynamic compilation and code generation [4, 16], have been used in program optimizations and achieved certain large speedups. These optimiza... |

41 |
Formal Program Construction by Transformations
- Bauer, Moller, et al.
- 1989
(Show Context)
Citation Context ...ition to directly reused, from one iteration to the next. Thus, it allows far more speedup. General program transformations [12, 38] can be used for optimization, as demonstrated in projects like CIP =-=[8, 11, 55]-=-. In contrast to such manual or semi-automatic approaches, our optimization of aggregate array computations can be automated and requires no user intervention or annotations. Our method for maintainin... |

41 | Software pipelining
- Allan, Jones, et al.
- 1995
(Show Context)
Citation Context ... language features [7, 12, 28, 38, 39, 40, 43, 45, 44, 55, 63], but no systematic technique handles aggregate computations on arrays. At the same time, many optimizations have been studied for arrays =-=[1, 2, 3, 5, 24, 26, 31, 34, 42, 49, 54, 58]-=-, but none of them achieves incrementalization. This paper presents a method and algorithms for incrementalizing aggregate array computations. The method is composed of algorithms for four major probl... |

41 |
J.G.L.: Fortran at ten gigaflops: the connection machine convolution compiler
- Bromley, Heller, et al.
- 1991
(Show Context)
Citation Context ... image processing, computational geometry, computer graphics, multimedia, matrix computation, list processing, graph algorithms, distributed property detection [26, 27], serializing parallel programs =-=[10, 20]-=-, etc. For example, in image processing, computing information about local neighborhoods is common [67, 69, 71, 72]. The local summation problem above is a simple but typical example [69, 71]. Overlap... |

40 |
Uniform techniques for loop optimization
- Pugh
(Show Context)
Citation Context ... language features [7, 12, 28, 38, 39, 40, 43, 45, 44, 55, 63], but no systematic technique handles aggregate computations on arrays. At the same time, many optimizations have been studied for arrays =-=[1, 2, 3, 5, 24, 26, 31, 34, 42, 49, 54, 58]-=-, but none of them achieves incrementalization. This paper presents a method and algorithms for incrementalizing aggregate array computations. The method is composed of algorithms for four major probl... |

39 | Systematic derivation of incremental programs - Liu, Teitelbaum - 1995 |

29 |
Compilation and delayed evaluation in APL
- Guibas, Wyatt
- 1978
(Show Context)
Citation Context ...3, 45, 46, 47, 63], but no systematic technique handles aggregate computations on arrays. At the same time, many optimizations have been studied for arrays, such as various APL compiler optimizations =-=[26, 36, 49]-=-, loop fusion [3, 5, 29, 66], pipelining [2], and loop reordering [7, 39, 50, 56, 62], but none of them achieves incrementalization. This paper presents a method and algorithms for incrementalizing ag... |

29 | Practical fine-grained static slicing of optimized code
- Ernst
- 1994
(Show Context)
Citation Context ... can be exploited. In particular, we have used tools developed by Pugh's group [55, 56, 57, 58]. Interestingly, ideas of incrementalization are used for optimizations in serializing parallel programs =-=[19]-=-. In conclusion, this work describes a method and algorithms that allow more drastic optimizations of aggregate array computations than previous methods. Besides achieving optimizations not previously... |

28 | Finding legal reordering transformations using mappings
- Kelly, Pugh
- 1994
(Show Context)
Citation Context ... on arrays. At the same time, many optimizations have been studied for arrays, such as various APL compiler optimizations [26, 36, 49], loop fusion [3, 5, 29, 66], pipelining [2], and loop reordering =-=[7, 39, 50, 56, 62]-=-, but none of them achieves incrementalization. This paper presents a method and algorithms for incrementalizing aggregate array computations. The method is composed of algorithms for four major probl... |

27 |
Compiler Construction for Digital Computers
- Gries, D
- 1971
(Show Context)
Citation Context ...rlapping aggregate array redundancy have been lacking. Optimizations similar to incrementalization have been studied for various language features, such as strength reduction of arithmetic operations =-=[4, 14, 31, 32]-=-, finite differencing of set and bag operations [51, 52, 54, 53, 72], and promotion-and-accumulation, finite differencing, and incrementalization of recursive functions [9, 43, 45, 46, 47, 63], but no... |

27 | Lazy array data-flow dependence analysis
- Maslov
- 1994
(Show Context)
Citation Context ...e latter case, resource requirements and communication costs are substantially reduced. Additionally, for this powerful optimization, we make use of techniques and tools for array dependence analysis =-=[18, 19, 41, 42, 50, 51, 52]-=- and sourceto -source transformation [5, 34, 42, 49, 54] that were developed for parallelizing compilers. Comparing the straightforward program (1) with the optimized program (24) on page 8, one can s... |

25 | Finite di erencing of computable expressions - Paige, Koenig - 1982 |

23 |
High level iterators and a method for automatically designing data structure representation
- Earley
- 1976
(Show Context)
Citation Context ...ional strength reduction from arithmetic operations to aggregate array computations. Finite differencing generalizes strength reduction to handle set operations in very-high-level languages like SETL =-=[17, 24, 25, 51, 52, 54]-=-. The idea is to replace aggregate operations on sets with incremental operations. Similar ideas are also used in the language INC [72], which allows programs to be written using operations on bags, r... |

22 |
Induction variables in very high-level languages
- Fong, Ullman
- 1976
(Show Context)
Citation Context ...broad generalization of strength reduction from arithmetics to aggregates in common high-level languages, such as FORTRAN, rather than to aggregates in special very-high-level languages, such as SETL =-=[24, 25, 53, 54]-=-. The speedup obtained from incrementalizing aggregate computations can be enormous compared to what is offered by previous compiler optimizations. Changes in hardware design have reduced the importan... |

22 |
A note on a standard strategy for developing loop invariants and loops
- Gries
- 1984
(Show Context)
Citation Context ...regate array computations can be automated and requires no user intervention or annotations. Our method for maintaining additional information is an automatic method for strengthening loop invariants =-=[16, 33, 34, 61]-=-. Our optimizations are based on the idea of explicit incremental computation, for which a general systematic transformational approach has been studied and formulated for a functional language [43, 4... |

22 | Discovering auxiliary information for incremental computation
- LIU, STOLLER, et al.
- 1996
(Show Context)
Citation Context ...lications are facing, yet methods for eliminating overlapping aggregate array redundancy have been lacking. Optimizations similar to incrementalization have been studied for various language features =-=[7, 12, 28, 38, 39, 40, 43, 45, 44, 55, 63]-=-, but no systematic technique handles aggregate computations on arrays. At the same time, many optimizations have been studied for arrays [1, 2, 3, 5, 24, 26, 31, 34, 42, 49, 54, 58], but none of them... |

21 |
Principles of Distributed System
- Garg
- 1996
(Show Context)
Citation Context ...ay redundancy. These include problems in image processing, computational geometry, computer graphics, multimedia, matrix computation, list processing, graph algorithms, distributed property detection =-=[27, 28]-=-, serializing parallel programs [10, 19], etc. For example, in image processing, computing information about local neighborhoods is common [22, 37, 69, 71, 73, 74]. The local summation problem above i... |

19 |
Data ow analysis of array and scalar references
- Feautrier
- 1991
(Show Context)
Citation Context ...e latter case, resource requirements and communication costs are substantially reduced. Additionally, for this powerful optimization, we make use of techniques and tools for array dependence analysis =-=[20, 21, 48, 50, 57, 58, 59, 60]-=- and source-to-source transformation [7, 39, 50, 56, 62] that were developed for parallelizing compilers. This paper is organized as follows. Section 2 gives the programming language. Sections 3 descr... |

19 |
The Science ofProgramming
- Gries
- 1981
(Show Context)
Citation Context |

16 |
Stream processing
- Goldberg, Paige
- 1984
(Show Context)
Citation Context ... systematic technique handles aggregate computations on arrays. At the same time, many optimizations have been studied for arrays, such as various APL compiler optimizations [26, 36, 49], loop fusion =-=[3, 5, 29, 66]-=-, pipelining [2], and loop reordering [7, 39, 50, 56, 62], but none of them achieves incrementalization. This paper presents a method and algorithms for incrementalizing aggregate array computations. ... |

14 |
Steele Jr. Fortran at ten Gigaflops: The Connection Machine convolution compiler
- Bromley, Heller, et al.
- 1991
(Show Context)
Citation Context ... image processing, computational geometry, computer graphics, multimedia, matrix computation, list processing, graph algorithms, distributed property detection [27, 28], serializing parallel programs =-=[10, 19]-=-, etc. For example, in image processing, computing information about local neighborhoods is common [22, 37, 69, 71, 73, 74]. The local summation problem above is a simple but typical example [71, 73].... |

14 |
Specification and Transformation of Programs—a Formal Approach to Software Development
- Partsch
- 1990
(Show Context)
Citation Context ...ition to directly reused, from one iteration to the next. Thus, it allows far more speedup. General program transformations [10, 33] can be used for optimization, as demonstrated in projects like CIP =-=[6, 9, 46]-=-. In contrast to such manual or semi-automatic approaches, our optimization of aggregate array computations can be automated and requires no user intervention or annotations. Our method for maintainin... |

12 |
Algebraic Methods for Program Construction: the Project CIP,” in Program Transformation and Programming Environments Report on a Workshop directed by
- Broy
- 1984
(Show Context)
Citation Context ...ition to directly reused, from one iteration to the next. Thus, it allows far more speedup. General program transformations [12, 38] can be used for optimization, as demonstrated in projects like CIP =-=[8, 11, 55]-=-. In contrast to such manual or semi-automatic approaches, our optimization of aggregate array computations can be automated and requires no user intervention or annotations. Our method for maintainin... |

10 | Principled strength reduction
- Liu
- 1997
(Show Context)
Citation Context ...information [38] were first formulated for a functional language. They have been adopted for loop incrementalization of imperative programs with no arrays, generalizing traditional strength reduction =-=[37]-=-. This paper extends that work to handle imperative programs that use arrays. It presents a broad generalization of strength reduction from arithmetics to aggregates in common high-level languages, su... |

9 |
Inductively computable constructs in very high level languages
- Fong
- 1979
(Show Context)
Citation Context ...broad generalization of strength reduction from arithmetics to aggregates in common high-level languages, such as FORTRAN, rather than to aggregates in special very-high-level languages, such as SETL =-=[24, 25, 53, 54]-=-. The speedup obtained from incrementalizing aggregate computations can be enormous compared to what is offered by previous compiler optimizations. Changes in hardware design have reduced the importan... |

8 | Serializing parallel programs by removing redundant computation
- Ernst
- 1994
(Show Context)
Citation Context ... image processing, computational geometry, computer graphics, multimedia, matrix computation, list processing, graph algorithms, distributed property detection [27, 28], serializing parallel programs =-=[10, 19]-=-, etc. For example, in image processing, computing information about local neighborhoods is common [22, 37, 69, 71, 73, 74]. The local summation problem above is a simple but typical example [71, 73].... |

8 |
Transformational programming--applications to algorithms and systems
- Paige
- 1983
(Show Context)
Citation Context |

8 | Array data-�ow analysis and its use in array privatization - Maydan, Amarasinghe, et al. - 1993 |

6 |
Symbolic finite differencing---Part I
- Paige
- 1990
(Show Context)
Citation Context |

5 | Speci cation and Transformation of Programs|A Formal Approach to Software Development - Partsch - 1990 |