Loop optimizer issues

Zdenek Dvorak rakdver@atrey.karlin.mff.cuni.cz
Tue Jun 3 10:17:00 GMT 2003


Hello,

> >>The fold function can be used for simplifying these expressions.
> >>
> >>However as Zack has pointed out in his paper there are 4 fold functions: 
> >>3 at rtl level, and one fold at tree level.  
> >>   
> >>
> >
> >and one more of mine that I have added due to iv analysis :-( I
> >just cannot cope with other rtl simplifiers that hapily "simplify"
> >2*3*4*x to (((x << 2) * 3) << 1).
> >
> Huh? Why shouldn't that just simplify to 24*x (or (x << 4) + (x << 
> 3))???  If this is a serious example than this indicates not that you 
> need yet another friggin' RTL folder, but that the existing one is 
> utterly broken
> Gr.

in fact you are half-right; if it did simplification to (x<<4) + (x<<3),
it would be still useless for me.  I do not need to simplify in sense
"make it run fast", but in sense "make it as canonical as possible so
that it is easy to manipulate/compare/...

Zdenek



More information about the Gcc mailing list