skip to main content
article

Automatic generation of peephole superoptimizers

Published: 20 October 2006 Publication History

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

[1]
Intel C++ Compiler 9.0. Software available at http://www.intel.com/software/products/compilers/clin.
[2]
Superoptimizer prototype. Available on the web at http://cs.stanford.edu/~sbansal/superoptimizer/.
[3]
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.
[4]
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.
[5]
J. Davidson and C. Fraser. Code selection through object code optimization. ACM Transactions on Programming Languages and Systems (TOPLAS), 6(4):505--526, 1984.
[6]
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.
[7]
J.L. Henning. SPEC CPU2000: Measuring CPU performance in the new millenium. IEEE Computer, 33(7):28--35, July 2000.
[8]
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.
[9]
X. Leroy, D. Doligez, J. Garrigue, and J. Vouillon. The Objective Caml system. Software and documentation available at http://caml.inria.fr.
[10]
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.
[11]
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.
[12]
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.
[13]
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.

Cited By

View all
  • (2025)TensorRight: Automated Verification of Tensor Graph RewritesProceedings of the ACM on Programming Languages10.1145/37048659:POPL(832-863)Online publication date: 9-Jan-2025
  • (2025)Composing Distributed Computations Through Task and Kernel FusionProceedings of the 30th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 110.1145/3669940.3707216(182-197)Online publication date: 30-Mar-2025
  • (2023)Search-Based Regular Expression Inference on a GPUProceedings of the ACM on Programming Languages10.1145/35912747:PLDI(1317-1339)Online publication date: 6-Jun-2023
  • Show More Cited By

Index Terms

  1. Automatic generation of peephole superoptimizers

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM SIGOPS Operating Systems Review
    ACM SIGOPS Operating Systems Review  Volume 40, Issue 5
    Proceedings of the 2006 ASPLOS Conference
    December 2006
    425 pages
    ISSN:0163-5980
    DOI:10.1145/1168917
    Issue’s Table of Contents
    • cover image ACM Conferences
      ASPLOS XII: Proceedings of the 12th international conference on Architectural support for programming languages and operating systems
      October 2006
      440 pages
      ISBN:1595934510
      DOI:10.1145/1168857
    Permission to make digital or hard copies of all or part 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 bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 20 October 2006
    Published in SIGOPS Volume 40, Issue 5

    Check for updates

    Author Tags

    1. code selection
    2. peephole optimization
    3. superoptimization

    Qualifiers

    • Article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)73
    • Downloads (Last 6 weeks)16
    Reflects downloads up to 08 Mar 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2025)TensorRight: Automated Verification of Tensor Graph RewritesProceedings of the ACM on Programming Languages10.1145/37048659:POPL(832-863)Online publication date: 9-Jan-2025
    • (2025)Composing Distributed Computations Through Task and Kernel FusionProceedings of the 30th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 110.1145/3669940.3707216(182-197)Online publication date: 30-Mar-2025
    • (2023)Search-Based Regular Expression Inference on a GPUProceedings of the ACM on Programming Languages10.1145/35912747:PLDI(1317-1339)Online publication date: 6-Jun-2023
    • (2023)Verifying the Verifier: eBPF Range Analysis VerificationComputer Aided Verification10.1007/978-3-031-37709-9_12(226-251)Online publication date: 17-Jul-2023
    • (2022)Quartz: superoptimization of Quantum circuitsProceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3519939.3523433(625-640)Online publication date: 9-Jun-2022
    • (2022)Vector instruction selection for digital signal processors using program synthesisProceedings of the 27th ACM International Conference on Architectural Support for Programming Languages and Operating Systems10.1145/3503222.3507714(1004-1016)Online publication date: 28-Feb-2022
    • (2014)Bit-Vector Rewriting with Automatic Rule GenerationProceedings of the 16th International Conference on Computer Aided Verification - Volume 855910.1007/978-3-319-08867-9_44(663-679)Online publication date: 18-Jul-2014
    • (2024)Minotaur: A SIMD-Oriented Synthesizing SuperoptimizerProceedings of the ACM on Programming Languages10.1145/36897668:OOPSLA2(1561-1585)Online publication date: 8-Oct-2024
    • (2024)Equivalence by Canonicalization for Synthesis-Backed RefactoringProceedings of the ACM on Programming Languages10.1145/36564538:PLDI(1879-1904)Online publication date: 20-Jun-2024
    • (2024)SuperStack: Superoptimization of Stack-Bytecode via Greedy, Constraint-Based, and SAT TechniquesProceedings of the ACM on Programming Languages10.1145/36564358:PLDI(1437-1462)Online publication date: 20-Jun-2024
    • Show More Cited By

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media