On Mon, 2011-07-04 at 17:30 +0200, Michael Matz wrote: > From reading it it really seems to be a normal block-local CSE, without > anything fancy. Hence, moving the pass just a little earlier (before > pass_vrp/pass_dominator) should already provide for all optimizations. If > not those should be improved. > I did a quick hack-up, and this looks like it will work well, at least on the few simple examples I threw at it.
> I see that it is used for also getting rid of the zero-offset statements > in case non-zero-offsets follow. I think that's generally worthwhile so > probably should be done in one of the above optimizers. > I will experiment with adding it to pass_dominator. Looks like tree-ssa-dom.c:optimize_stmt is the place to start. Thanks, Bill