Hi,

On Tue, 22 May 2012, Richard Guenther wrote:

> > I had thought of that as well.  But it is not quite that simple -- the
> > problem is that tree-ssa-reassoc.c as part of its core algorithm 
> > reassociates
> > expressions all the time while even still building up the tree, see e.g.
> > linearize_expr or break_up_subtract.  Those steps may all be invalid in
> > general, but we only know whether that is true at the very end, once we've
> > built up the full tree -- but at that point it is already too late.
> 
> Hmm, really?

Yep, reassoc rewrites already at linearize time.  I think that could be 
changed without too much hassle.

> I had not realized it does something it cannot undo later ...
> but well ISTR patches floating around for re-organizing how we do
> the break_up_subtract / negate stuff.  Micha?

Yes, I have an incomplete patch for that, but it didn't touch the current 
fundamental implementation detail of tree-reassoc, namely touching 
statements at analyze time already.


Ciao,
Michael.

Reply via email to