"Semantic Retention": Extended Optimization using Peephole strategy

Joe Hummel <jhummel@crispix.ICS.UCI.EDU>
7 Nov 1996 20:41:47 -0500

          From comp.compilers

Related articles
Extended Optimization using Peephole strategy bear@sonic.net (Ray S. Dillinger) (1996-11-05)
"Semantic Retention": Extended Optimization using Peephole strategy jhummel@crispix.ICS.UCI.EDU (Joe Hummel) (1996-11-07)
| List of all articles for this month |

From: Joe Hummel <jhummel@crispix.ICS.UCI.EDU>
Newsgroups: comp.compilers
Date: 7 Nov 1996 20:41:47 -0500
Organization: Compilers Central
References: 96-11-041
Keywords: optimize,

> I am writing a compiler for scheme, and I've hit upon a strategy which
> seems new to me... At the same time, it's fairly simple, and I was
> wondering if someone's done it before, or whether I ought to write a
> paper on it?
> Basically, I am using a peephole optimizer to do most of the optimizing
> job -- but with additional information coded in the "instruction set"
> I'm using for my intermediate form... By moving these "instructions"
> around in the program ... I get some pretty sophisticated optimizations.

Hi. We wrote a paper along these very same lines in '95, and we were
unable to find any related work. Either there isn't any, or it's so
obvious that no one bothered to write it up! We assumed the former :-)

We called it "semantic retention." The idea is to retain info collected
by the compiler in the front-end (parsing, analysis, and programmer
assertions), and pass it to the back-end as part of each instruction.
In particular, we collected info on memory references, and passed this
to the back-end to improve memory disambiguation during instruction

Advantages: back-end gets info it might not be able to compute itself,
other info that it could have computed it gets for free, and the compiler
still has a nice separate between the front and back ends. Disadvantage:
info being passed in some cases is more conservative than might otherwise
be available if the back-end had direct access to the dependence graphs
and so forth computed by the front-end.

I encourage you to write up your work, it sounds very interesting.
Here's the ref to our paper:

    S. Novack and J. Hummel and A. Nicolau, "A Simple Mechanism for Improving
        the Accuracy and Efficiency of Instruction-level Disambiguation",
        LNCS 1033, Springer-Verlag, 1996, pp. 289-303. [ NOTE: Proceedings of
        the 8th International Workshop on Languages and COmpilers for Parallel
        Computing, 1995. ]


    - joe hummel
[Actually, now that you mention it, in the AIX 1.0 C compilers for the
ROMP, we put some stylized comments into the assembler to help the -O
back end peepholer. This was in about 1983. -John]


Post a followup to this message

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