i changed the compiler to remove unneeded compare with
zero instructions when the previous instruction already
sets the zero flag in the peephole optimizaiton pass.

http://felloff.net/usr/cinap_lenrek/6cpeep.diff

this removes compares for zero/non zero tests only.
it only looks at the previous non-nop instruction
to see if it sets our compare value register.

it seems to work fine so far. our pc64 kernel got
arround 8K smaller, ghostscript got 5K smaller.

i'm not a compiler expert tho, so i'd like to hear if
there are any issues with this approach or if there are
better ways to do this.

--
cinap

Reply via email to