[mod.compilers] Peephole optimizations of jumps to jumps

johnl@ima.UUCP (03/11/87)

> [...  It also seems that about half of the peephole transformations
> are quite machine independent, like removing ... jumps to jumps... -John]

This is something that confuses me about the compiler literature.  Why
are jumps to jumps invariably removed in the peephole optimizer, when
it's so easy to generate code without them in the first place?  You have
to parse a whole procedure at a time rather than generating on the fly,
but this is not a big deal...
-- 
David Eppstein, eppstein@cs.columbia.edu, Columbia U. Computer Science Dept.
[Other peephole transformations like tail merging and loop inversion often
introduce jumps to jumps which have to be removed at peephole time anyway, so
you might as well do it all at peephole time.  Also, I've found that the code
generation for things like short-circuit conditionals (&& and || in C) is
enough of a pain already without trying to do the de-jumping at the same time.
-John]
--
Send compilers articles to ima!compilers or, in a pinch, to Levine@YALE.EDU
Plausible paths are { ihnp4 | decvax | cbosgd | harvard | yale | cca}!ima
Please send responses to the originator of the message -- I cannot forward
mail accidentally sent back to compilers.  Meta-mail to ima!compilers-request