Choosing the most appropriate optimization phase ordering has been a long-standing problem in compiler optimizations. Exhaustive evaluation of all possible orderings of optimization phases for each function is generally dismissed as infeasible for production-quality compilers targeting accepted benchmarks. In this article, we show that it is possible to exhaustively evaluate the optimization phase order space for each function in a reasonable amount of time for most of the functions in our benchmark suite. To achieve this goal, we used various techniques to significantly The current work differs from both of these earlier papers in several aspects: (1) we introduce a completely new search algorithm (Section 5) to more efficiently find the successive phase order sequences to evaluate. We also note the trade-offs in choosing any one algorithm over the other; (2) we have doubled our benchmark set from 6 to 12 benchmarks, and more than doubled the number of studied functions, from 111 to 244. Many of the newer functions added are significantly larger, making our switch to the new search algorithm more critical; (3) a new section (Section 8) presents interesting results from analyzing the exhaustive phase order space over the entire set of functions. These results, which are shown in Figures 11 through 19 , required a significant amount of time to collect; (4) all the remaining sections in this article also go into more depth about the issues involved in the development of the search algorithm, pruning techniques, and other implementation issues. This research was supported in part by NSF grants EIA-0072043, CCR-0208892, CCR-0312493, CCF-0444207, and CNS-0305144. Authors' addresses: Prasad A. Kulkarni, University of Kansas, Lawrence, Kansas; email: Kulkarni@eecs.ku.edu; David B. Whalley and Gary S. Tyson, Florida State University, Tallahassee, Florida; Jack W. Davidson, University of Virginia, Charlottesville, Virginia. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies show this notice on the first page or initial screen of a display along with the full citation. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers, to redistribute to lists, or to use any component of this work in other works requires prior specific permission and/or a fee. Permissions may be requested from the Publications Dept., ACM, Inc., 2 Penn Plaza, Suite 701, New York, NY 10121-0701 USA, fax +1 ( prune the optimization phase order search space so that it can be inexpensively enumerated in most cases and reduce the number of program simulations required to evaluate program performance for each distinct phase ordering. The techniques described are applicable to other compilers in which it is desirable to find the best phase ordering for most functions in a reasonable amount of time. We also describe some interesting properties of the optimization phase order space, which will prove useful for further studies of related problems in compilers.
Kulkarni et al. developed a novel search strategy to achieve exhaustive evaluation of the entire phase order search space and find the best phase ordering for most functions in their embedded systems benchmarks, but the searches required several hours to a few weeks in many cases REF .
Practical exhaustive optimization phase order exploration and evaluation
TACO
Computer Science