Bad optimization in PCC?

Guy Harris guy at gorodish.Sun.COM
Mon Apr 25 13:18:00 AEST 1988


> While hacking a piece of code the other day, I came across what
> looks like a case of bad optimization in PCC-derivated compilers.

The peephole optimizer isn't part of PCC, so this doesn't have anything to do
with PCC per se.

> It seems to me that a *good* peep-hole optimizer should be able to
> recognize that if the jump at line (+) is taken then the jump at line
> (*) will not be taken.

Nope.  What happens if "*np" is asynchronously changed between the two tests?



More information about the Comp.lang.c mailing list