## Exploring the structure of the space of compilation sequences using randomized search algorithms (2004)

Venue: | Proc of the 2004 Los Alamos Computer Science Institute (LACSI) Symposium |

Citations: | 8 - 1 self |

### BibTeX

@INPROCEEDINGS{Cooper04exploringthe,

author = {Keith D. Cooper and Alexander Grosul and Timothy J. Harvey and Steve Reeves and Devika Subramanian and Linda Torczon and Todd Waterman},

title = {Exploring the structure of the space of compilation sequences using randomized search algorithms},

booktitle = {Proc of the 2004 Los Alamos Computer Science Institute (LACSI) Symposium},

year = {2004}

}

### OpenURL

### Abstract

Modern optimizing compilers apply a fixed sequence of optimizations, which we call a compilation sequence, to each program that they compile. These compilers let the user modify their behavior in a small number of specified ways, using command-line flags (e.g.,-O1,-O2,...). For five years, we have been working with compilers that automatically select an appropriate compilation sequence for each input program. These adaptive compilers discover a good compilation sequence tailored to the input program, the target machine, and a user-chosen objective function. We have shown, as have others, that program-specific sequences can produce better results than any single universal sequence [1, 23, 7, 10, 21] Our adaptive compiler looks for compilation sequences in a large and complex search space. Its typical compilation sequence includes 10 passes (with possible repeats) chosen from the 16 available—there are 16 10 or 1,099,511,627,776 such sequences. To learn about the properties of such spaces, we have studied subspaces that consist of 10 passes drawn from a set of 5 (5 10 or 9,765,625 sequences). These 10of-5 subspaces are small enough that we can analyze them thoroughly but large enough to reflect important properties of the full spaces. This paper reports, in detail, on our analysis of several of these subspaces and on the consequences of those observed properties for the design of search algorithms. 1 Compilation Sequences Compilers operate by applying a fixed sequence of optimizations, called a compilation sequence, to all programs. The compiler writer must select ten to twenty optimizations from the hundreds that have been pro-

### Citations

846 | Efficiently Computing Static Single Assignment Form and the
- Cytron, Ferrante, et al.
- 1991
(Show Context)
Citation Context ...cks and redundant control-flow [11] c sparse conditional constant propagation combines optimistic constant propagation with unreachable code elimination [22] d dead code elimination based on ssa-form =-=[12, 11]-=- g optimistic value numbering uses partitioning to find global redundancies [2] m renaming builds a name space suitable for the implementations of either l or z. The compiler inserts it automatically ... |

309 | Zadeck, Constant Propagation with Conditional Branches
- Wegman, Kenneth
- 1991
(Show Context)
Citation Context ...s control-flow elimination eliminates empty blocks and redundant control-flow [11] c sparse conditional constant propagation combines optimistic constant propagation with unreachable code elimination =-=[22]-=- d dead code elimination based on ssa-form [12, 11] g optimistic value numbering uses partitioning to find global redundancies [2] m renaming builds a name space suitable for the implementations of ei... |

220 |
Detecting equality of variables in programs
- Alpern, Wegman, et al.
- 1988
(Show Context)
Citation Context ...es optimistic constant propagation with unreachable code elimination [22] d dead code elimination based on ssa-form [12, 11] g optimistic value numbering uses partitioning to find global redundancies =-=[2]-=- m renaming builds a name space suitable for the implementations of either l or z. The compiler inserts it automatically before l or z. r algebraic reassociation uses commutative and distributive law ... |

179 |
C.: Global optimization by suppression of partial redundancies
- Morel, Renvoise
- 1979
(Show Context)
Citation Context ...e were able to perform the experiments on asp loop peeling peels the first iteration of each innermost loop l partial redundancy elimination finds and eliminates redundancies and partial redundancies =-=[17]-=- o peephole optimization examines logically adjacent operations and tries to simplify them [13] s register coalescing eliminates register-to-register copy operations [5] n useless control-flow elimina... |

157 | Lazy code motion
- Knoop, Ruething, et al.
- 1992
(Show Context)
Citation Context ...ue numbering over dominator trees [4] y EBB value numbering performs value numbering over extended basic blocks [4] z lazy code motion improves on l with more careful placement of inserted operations =-=[16]-=- Table 1: Passes available in the prototype compiler variety of machines. We can also compare and contrast the results with those of experiments that we do in the future—after the current hardware is ... |

125 | Optimizing for reduced code space using genetic algorithms
- Cooper, Schielke, et al.
- 1999
(Show Context)
Citation Context ...e input program, the target machine, and a user-chosen objective function. We have shown, as have others, that program-specific sequences can produce better results than any single universal sequence =-=[1, 23, 7, 10, 21]-=- Our adaptive compiler looks for compilation sequences in a large and complex search space. Its typical compilation sequence includes 10 passes (with possible repeats) chosen from the 16 available—the... |

109 |
Computer Methods for Mathematical Computations
- Forsythe, Malcolm, et al.
- 1977
(Show Context)
Citation Context ... future—after the current hardware is gone. 4 Background on the Enumerations The two programs, fmin and zeroin, are both taken from Forsythe, Malcolm, and Moler’s classic book on numerical algorithms =-=[14]-=-. fmin computes the minimum of a unimodal function by a combination of golden section search and parabolic interpolation. zeroin searches for the zero of an input function between given bounds. Both p... |

108 | Compiler optimization-space exploration
- Triantafyllis, Vachharajani, et al.
- 2005
(Show Context)
Citation Context ...e input program, the target machine, and a user-chosen objective function. We have shown, as have others, that program-specific sequences can produce better results than any single universal sequence =-=[1, 23, 7, 10, 21]-=- Our adaptive compiler looks for compilation sequences in a large and complex search space. Its typical compilation sequence includes 10 passes (with possible repeats) chosen from the 16 available—the... |

87 | Adaptive Optimizing Compilers for the 21st Century
- Cooper, Subramanian, et al.
(Show Context)
Citation Context ...e input program, the target machine, and a user-chosen objective function. We have shown, as have others, that program-specific sequences can produce better results than any single universal sequence =-=[1, 23, 7, 10, 21]-=- Our adaptive compiler looks for compilation sequences in a large and complex search space. Its typical compilation sequence includes 10 passes (with possible repeats) chosen from the 16 available—the... |

85 | Effective Partial redundancy Elimination
- Briggs, Cooper
- 1994
(Show Context)
Citation Context ...me space suitable for the implementations of either l or z. The compiler inserts it automatically before l or z. r algebraic reassociation uses commutative and distributive law to reorder expressions =-=[3]-=- t strength reduction replaces iterated multiplies with iterated additions [9] u local value numbering folds constants and eliminates redundancies [11] v SCC value numbering implements an optimistic, ... |

75 | Combining Analyses, Combining Optimizations
- Click, Cooper
- 1995
(Show Context)
Citation Context ...s between optimizations are complex and uncharacterized. Transformation a may create opportunities for later application of b; alternately, it may eliminate opportunities for another transformation c =-=[18, 23, 6]-=-. In fact, this behavior is also program specific; a’s ability to create or eliminate opportunities depends on the presence of specific features in the code being compiled. To address these problems—c... |

75 | Engineering a Compiler
- Cooper, Torczon
- 2004
(Show Context)
Citation Context ...rations and tries to simplify them [13] s register coalescing eliminates register-to-register copy operations [5] n useless control-flow elimination eliminates empty blocks and redundant control-flow =-=[11]-=- c sparse conditional constant propagation combines optimistic constant propagation with unreachable code elimination [22] d dead code elimination based on ssa-form [12, 11] g optimistic value numberi... |

72 | An Approach for Exploring Code-Improving Transformations
- Whitfield, Soffa
- 1997
(Show Context)
Citation Context |

54 | Value numbering
- Briggs, Cooper, et al.
- 1994
(Show Context)
Citation Context ... numbering folds constants and eliminates redundancies [11] v SCC value numbering implements an optimistic, global version of value numbering [20] x DVNT performs value numbering over dominator trees =-=[4]-=- y EBB value numbering performs value numbering over extended basic blocks [4] z lazy code motion improves on l with more careful placement of inserted operations [16] Table 1: Passes available in the... |

53 |
Finding effective compilation sequences
- Almagor, Cooper, et al.
- 2004
(Show Context)
Citation Context |

47 |
The Design and Application of a Retargetable Peephole Optimizer
- Davidson, Fraser
- 1980
(Show Context)
Citation Context ...nermost loop l partial redundancy elimination finds and eliminates redundancies and partial redundancies [17] o peephole optimization examines logically adjacent operations and tries to simplify them =-=[13]-=- s register coalescing eliminates register-to-register copy operations [5] n useless control-flow elimination eliminates empty blocks and redundant control-flow [11] c sparse conditional constant prop... |

35 | Predicting the Impact of Optimizations for Embedded Systems
- Zhao, Childers, et al.
- 2003
(Show Context)
Citation Context ... sequences distributed in the search spaces? 3. Are local minima 3 numerous? How are their fitness values distributed? 2 Others, notably Soffa et al., are working on models that capture these effects =-=[24]-=-. 3 The family of search algorithms we consider are randomized hill climbing algorithms, and the distribution and preponderance of local minima in the search space determine their overall efficacy. Eq... |

34 |
Value-driven Redundancy Elimination
- Simpson
- 1996
(Show Context)
Citation Context ...rated multiplies with iterated additions [9] u local value numbering folds constants and eliminates redundancies [11] v SCC value numbering implements an optimistic, global version of value numbering =-=[20]-=- x DVNT performs value numbering over dominator trees [4] y EBB value numbering performs value numbering over extended basic blocks [4] z lazy code motion improves on l with more careful placement of ... |

29 | Operator strength reduction
- Cooper, Simpson, et al.
- 1995
(Show Context)
Citation Context ...ts it automatically before l or z. r algebraic reassociation uses commutative and distributive law to reorder expressions [3] t strength reduction replaces iterated multiplies with iterated additions =-=[9]-=- u local value numbering folds constants and eliminates redundancies [11] v SCC value numbering implements an optimistic, global version of value numbering [20] x DVNT performs value numbering over do... |

13 |
P.W.: Register allocation via graph coloring
- Chaitin, Auslander, et al.
- 1981
(Show Context)
Citation Context ...cies and partial redundancies [17] o peephole optimization examines logically adjacent operations and tries to simplify them [13] s register coalescing eliminates register-to-register copy operations =-=[5]-=- n useless control-flow elimination eliminates empty blocks and redundant control-flow [11] c sparse conditional constant propagation combines optimistic constant propagation with unreachable code eli... |

13 | Impact of economics on compiler optimization
- Robison
- 2001
(Show Context)
Citation Context ...igh-payoff techniques with a more narrow focus. 1 As Robison observes: “Compile-time program optimizations are similar to poetry: more are written than are actually published in commercial compilers” =-=[19]-=-. The compiler writer must also pick an order in which to execute the optimizations. We have little theoretical understanding of the effect of a given compilation sequence on the properties of the com... |

6 |
and Adolfy Hoisie. Performance Optimization of Numerically Intensive Codes
- Goedecker
- 2001
(Show Context)
Citation Context ...ns, we ran a hill-climbing algorithm to find good sequences in a 10-of-16 space. The full set of transformations is shown in Table 1; they address scalar inefficiencies rather than memory performance =-=[15, 11]-=-. The objective function was ILOC operations executed, which we also refer to as the dynamic operation count. We started the hill climber from 100 randomly chosen points and recorded the final sequenc... |

4 |
An approach to incremental compilation of optimized code
- Pollock
- 1986
(Show Context)
Citation Context ...s between optimizations are complex and uncharacterized. Transformation a may create opportunities for later application of b; alternately, it may eliminate opportunities for another transformation c =-=[18, 23, 6]-=-. In fact, this behavior is also program specific; a’s ability to create or eliminate opportunities depends on the presence of specific features in the code being compiled. To address these problems—c... |