Hello,

> On Wed, 2006-10-25 at 13:01 -0700, Devang Patel wrote:
> > > > However, various optimizer needs to know about this special tree node.
> > >
> > > not really (not any more than they know about other tree codes that are
> > > not interesting for them).
> > 
> > If we take an example of Jump Threading pass then it needs to  know
> > about this tree node and update it properly.
> That could get awful ugly.

actually, that will be trivial once jump threading updates loop properly
(I have a patch for that).

> > So, the passes that maniuplate loop structure need to know about
> > LOOP_HEADER and others do not need to worry about LOOP_HEADER.
> Passes which do code motions may need to know about it -- they don't
> need to update its contents, but they may need to be careful about
> how statements are moved around in the presence of a LOOP_HEADER note.

Which is IMHO good, as it will at least ensure that they preserve loops,
in case it is really relevant for them -- just now, I do not see how
code motion could affect loop structures (unless it changes CFG) -- do
you have some concrete example of transformation that might be made
more problematic by the existence of LOOP_HEADER node?

Zdenek

Reply via email to