Re: Peephole Optimization

Mark Leone <>
Fri, 3 Mar 1995 03:00:53 GMT

          From comp.compilers

Related articles
Peephole Optimization (1995-02-27)
Re: Peephole Optimization (Mark Leone) (1995-03-03)
| List of all articles for this month |

Newsgroups: comp.compilers
From: Mark Leone <>
Keywords: optimize
Organization: School of Computer Science, Carnegie Mellon
References: 95-03-006
Date: Fri, 3 Mar 1995 03:00:53 GMT

<> wrote:
> In the article listed below Peter Kessler describes a method for automatically
> analyzing a machine description to discover 'machine idioms'. He mentions
> near the end of the article that over 300 idioms for the 68000 and a similar
> number for the VAX were found.

There's a related paper by Massalin in ASPLOS '87:
Superoptimizer --- A look at the smallest program. Proceedings of the
Second International Conference on Architectural Support for
Programming Languages and Operating Systems (ASPLOS II), Oct. 1987, IEEE.

        The superoptimizer is a tool that, given an instruction set, 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, it is
        possible to 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

Mark Leone <>
School of Computer Science, Carnegie Mellon University
Pittsburgh, PA 15213 USA

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.