Automatic generation of peephole superoptimizers

  • Authors:
  • Sorav Bansal;Alex Aiken

  • Affiliations:
  • Stanford University;Stanford University

  • Venue:
  • Proceedings of the 12th international conference on Architectural support for programming languages and operating systems
  • Year:
  • 2006

Quantified Score

Hi-index 0.04

Visualization

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.