Superoptimizer: a look at the smallest program

  • Authors:
  • Henry Massalin

  • Affiliations:
  • Columbia Univ., New York, NY

  • Venue:
  • ASPLOS II Proceedings of the second international conference on Architectual support for programming languages and operating systems
  • Year:
  • 1987

Quantified Score

Hi-index 0.01

Visualization

Abstract

Given an instruction set, the superoptimizer finds the shortest program to compute a function. Startling programs have been generated, many of them engaging in convoluted bit-fiddling bearing little resemblance to the source programs which defined the functions. The key idea in the superoptimizer is a probabilistic test that makes exhaustive searches practical for programs of useful size. The search space is defined by the processor's instruction set, which may include the whole set, but it is typically restricted to a subset. By constraining the instructions and observing the effect on the output program, one can gain insight into the design of instruction sets. In addition, superoptimized programs may be used by peephole optimizers to improve the quality of generated code, or by assembly language programmers to improve manually written code.