This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] Patch ping

On Wed, 2003-12-03 at 13:00, Zdenek Dvorak wrote:
> > On Wed, 2003-12-03 at 12:44, Zdenek Dvorak wrote:
> > > Hello,
> > > 
> > > > So this is never called on a block with just one incoming edge and a
> > > > back edge?
> > > 
> > > no; it is used to split loops with shared headers, which is exactly when
> > > there are more back edges comming into the loop header.
> > > 
> > 
> > Sorry, maybe Im being dense :-)
> > 
> > if you have one incoming edge and 2 back edges?
> sorry, I should say it more clearly -- back edges are always
> kept pointing to the newly created block (dummy); just the entry edges
> of the loop are redirected back to bb.

I get it, Im looking at it upside down :-). Dummy is in fact the last
block in the loop, and it 'fallsthru' to the entrance block.  all the
back edges go to dummy so that there is just one edge back to the top of
the loop.  I was picturing it such that dummy was the loop entrance,
sorry :-)

OK, I think I understand whats going on now :-) I was a little confused
about moving all the labels too, but I think I have a handle on it too

Out of curiosity, rather than copying all the incoming edges from BB to
dummy, moving all the labels, then redirecting the ones you dont want
back to BB, why not just create dummy and redirect the incoming edges
from BB to dummy that you want?  It seems a like a little less work and
might be a bit clearer to read.  I dont think updating the PHI nodes
would be any different would it? 

Anyway, the patch is fine.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]