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.
References
- Aho, A. V., Sethi, R, Ullman, J. D. Compilers Principles, Techniques, and Tools. Addison Wesley, 1986. Google Scholar
- Davidson, J. W. and Fraser, C. W. Automatic Generation of Peephole Optimizations. In Proceedings of the ACM SIGPLAN '84 Symposium on Compiler Construction, pages 111--116. ACM/SIGPLAN, June, 1984. Google Scholar
- Kessler, P. B. Discovering Machine-Specific Code Improvements. In Proceedings of the ACM/SIGPLAN '86 Symposium on Compiler Construction, pages 249--254. ACM/SIGPLAN, June, 1986. Google Scholar
- Krumme, D. W. and Ackley, D. H. A Practical Method for Code Generation Based On Exhaustive Search. In Proceedings of the ACM SIGPLAN '82 Symposium on Compiler Construction, pages 185--196. ACM/SIGPLAN, June, 1982. Google Scholar
Index Terms
Superoptimizer: a look at the smallest program







Comments