Peephole optimizations of jumps to jumps (David Eppstein)
11 Mar 87 18:22:37 GMT

          From comp.compilers

Related articles
Peephole optimizations of jumps to jumps (1987-03-11)
| List of all articles for this month |

From: (David Eppstein)
Date: 11 Mar 87 18:22:37 GMT
References: <373@artecon.artecon.UUCP>
Organization: Columbia University CS Department

> [... 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,, 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.

Post a followup to this message

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