[comp.os.minix] peephole optimizer

HELMER%SDNET.BITNET@vm1.nodak.edu (Guy Helmer) (02/07/89)

A long time ago, someone posted the Dr. Dobb's peephole optimizer
that was ported to run on Minix.  I have the code from this posting,
but some parts seems to be missing and I don't remember who posted
it.  Could that person (or anyone else) please send mail describing
the parts of the optimizer that I should have?  Does the optimizer need
the 1.2 library?

Thanks,
Guy Helmer
BITNET: HELMER@SDNET
uucp:   ghelmer@loft386     ...!killer!warble!loft386!ghelmer

dcd@tc.fluke.COM (David Dyck) (02/08/89)

In article <8126@louie.udel.EDU> HELMER%SDNET.BITNET@vm1.nodak.edu (Guy Helmer) writes:
>A long time ago, someone posted the Dr. Dobb's peephole optimizer
>that was ported to run on Minix.  I have the code from this posting,
>but some parts seems to be missing and I don't remember who posted
>it.  Could that person (or anyone else) please send mail describing
>the parts of the optimizer that I should have?  Does the optimizer need
>the 1.2 library?
>
>Thanks,
>Guy Helmer
>BITNET: HELMER@SDNET
>uucp:   ghelmer@loft386     ...!killer!warble!loft386!ghelmer


I didn't post it but I do have it.
The crc of the parts were:

31925  19640 copt.c
52073   1659 copt.dat
14190   2502 copt.man
24123    726 copt.v20
15134   3116 coptdefs.h
41553   2179 coptglob.c
34100    399 inline.dat
32885    455 locate.c
55970  17738 regstuf.c

Here is the intro that was posted with it:

Path: fluke!ssc-vax!uw-beaver!cornell!rochester!rutgers!unirot!mwalls
>From: mwalls@unirot.UUCP (monty walls)
Newsgroups: comp.os.minix
Subject: peephole optimizer for minix
Message-ID: <587@unirot.UUCP>
Date: 7 Jan 88 08:22:44 GMT
Reply-To: mwalls@unirot.UUCP (monty walls)
Distribution: na
Organization: Public Access Unix, Piscataway NJ
Lines: 1961

--------------------------------------------------------------------------

	Enclosed is a copy of the Peephole Optimizer that was published
in Dr. Dobbs Journal in 1984.  I have included a copy of my optimization
file for the minix c compiler.  Using the peephole optimizer will
generally result in a 8 - 15 % speed improvement and a 8 - 10 % size
reduction.  The optimizer does jump optimizations also and will permit
you to compile and assemble program whose size would normally cause 
asld(emacs & elle) to choke.  I have also included the v20 optimizations
and inline code expansion I'm using in the kernel.  Word of warning the
optimizer data file should not have any trailing blank lines or
it eats all the input!!!  The peephole optimizer expects unpacked
assembler source.

-Monty Walls

Monty Walls
MIS Division, Tech. Support
Oklahoma Tax Commission
2501 N. Lincoln
OKC, OK, 73194 

ast@cs.vu.nl (Andy Tanenbaum) (07/16/89)

I tried the peephole optimizer with the 1.3 compiler.  It seemed to win about
1/3 of one percent.  Doesn't seem like it is worth including.  Has anybody else
gotten better results?  Maybe I have done something wrong.  I vaguely recall
somebody saying that using it made it possible to link elle on MINIX, something
I would very much like to do.

Andy Tanenbaum (ast@cs.vu.nl)