Abstract
Peephole optimizers are typically constructed using human-written pattern matching rules, an approach that requires expertise and time, as well as being less than systematic at exploiting all opportunities for optimization. We explore fully automatic construction of peephole optimizers using brute force superoptimization. While the optimizations discovered by our automatic system may be less general than human-written counterparts, our approach has the potential to automatically learn a database of thousands to millions of optimizations, in contrast to the hundreds found in current peephole optimizers. We show experimentally that our optimizer is able to exploit performance opportunities not found by existing compilers; in particular, we show speedups from 1.7 to a factor of 10 on some compute intensive kernels over a conventional optimizing compiler.
References
- Intel C++ Compiler 9.0. Software available at http://www.intel.com/software/products/compilers/clin.Google Scholar
- Superoptimizer prototype. Available on the web at http://cs.stanford.edu/~sbansal/superoptimizer/.Google Scholar
- B. Anckaert, F. Vandeputte, B.D. Bus, B.D. Sutter, and K.D. Bosschere. Link-time optimization of ia64 binaries. In Proceedings of the 10th International Euro-par Conference, pages 211--220, 2004.Google Scholar
Cross Ref
- M.E. Benitez and J.W. Davidson. A portable global optimizer and linker. In Proceedings of the SIGPLAN '88 Conference on Programming Language Design and Implementation, pages 329--338, 1988. Google Scholar
Digital Library
- J. Davidson and C. Fraser. Code selection through object code optimization. ACM Transactions on Programming Languages and Systems (TOPLAS), 6(4):505--526, 1984. Google Scholar
Digital Library
- T. Granlund and R. Kenner. Eliminating branches using a superoptimizer and the gnu C compiler. In Proceedings of the ACM SIGPLAN '92 Conference on Programming Language Design and Implementation, volume 27, pages 341--352, San Francisco, CA, June 1992. Google Scholar
Digital Library
- J.L. Henning. SPEC CPU2000: Measuring CPU performance in the new millenium. IEEE Computer, 33(7):28--35, July 2000. Google Scholar
Digital Library
- R. Joshi, G. Nelson, and K.H. Randall. Denali: A goal-directed superoptimizer. In Proceedings of the ACM SIGPLAN '02 Conference on Programming Language Design and Implementation, pages 304--314, Berlin, Germany, June 2002. Google Scholar
Digital Library
- X. Leroy, D. Doligez, J. Garrigue, and J. Vouillon. The Objective Caml system. Software and documentation available at http://caml.inria.fr.Google Scholar
- H. Massalin. Superoptimizer: A look at the smallest program. In Second International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS II), pages 122--126, 1987. Google Scholar
Cross Ref
- M.W. Moskewicz, C.F. Madigan, Y. Zhao, L. Zhang, and S. Malik. Chaff: Engineering an Efficient SAT Solver. In Proceedings of the 38th Design Automation Conference (DAC'01), 2001. Google Scholar
Digital Library
- L.V. Put, D. Chanet, B.D. Bus, B.D. Sutter, and K.D. Bosschere. Diablo: a reliable, retargetable and extensible link-time rewriting framework. In Proceedings of the 2005 IEEE International Symposium on Signal Processing and Information Technology, pages 7--12, 2005.Google Scholar
- L. Zhang, C.F. Madigan, M.W. Moskewicz, and S. Malik. Efficient conflict driven learning in boolean satisfiability solver. In ICCAD, pages 279--285, 2001. Google Scholar
Digital Library
Index Terms
Automatic generation of peephole superoptimizers





Comments