## 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

1503 |
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... |

596 | A transformation system for developing recursive programs
- Burstall, Darlington
- 1977
(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... |

492 |
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... |

472 | The Omega test: A fast and practical integer programming algorithm for dependence analysis
- Pugh
- 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 =-=[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... |

221 | 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... |

190 | A general approach for run-time specialization and its application to C
- Consel, Noël
- 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... |

177 | 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... |

171 |
Unimodular transformations of double loops
- Banerjee
- 1991
(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... |

166 | Optimizing ML with run-time code generation
- Lee, Leone
- 1996
(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 ... |

114 |
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... |

103 |
effective dynamic compilation
- Fast
- 1996
(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 ... |

100 |
A catalogue of optimizing transformations
- Allen, Cocke
- 1971
(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. ... |

91 |
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... |

91 |
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... |

89 |
Dependency analysis for Subscripted Variables and its Application to Program Transformation
- Allen
- 1983
(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. ... |

83 | An exact method for 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 |
An algorithm for reduction of operator strength
- Cocke, Kennedy
- 1977
(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... |

50 | 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... |

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... |

43 | Transport by pipeline
- Jones, Paddock
- 1982
(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... |

42 |
Formal program construction by transformations – computer-aided, intuition guided programming
- Bauer, Möller, 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... |

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... |

42 |
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... |

41 |
Uniform techniques for loop optimization
- Pugh
- 1991
(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 |

30 |
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... |

30 | 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... |

29 |
Compiler Construction for Digital Computers
- Gries
- 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... |

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 | 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... |

27 | Finite dierencing of computable expressions - Paige, Koenig - 1982 |

25 |
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... |

24 |
Principles of distributed systems
- Anaheim, GARG, et al.
- 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... |

23 |
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... |

20 |
Dataow 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. ... |

15 |
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 |
Speci 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 |