This is the mail archive of the gcc-patches@gcc.gnu.org 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 12:14, Zdenek Dvorak wrote:
> Hello,
> 
> > > > If you only redirect one edge, aren't you going to create PHI nodes with
> > > > one argument? I beleive those are illegal.
> > > 
> > > No they are not.  In fact quite many of them are created during
> > > optimizations (for example due to jump threading, or when some blocks
> > > are removed as unreachable).  I am working on a cleanup that removes them,
> > > but it still has some problems.
> > 
> > As long as they are removed in a timely fashion. It would be preferable
> > not to create them in the first place, it ought to be easy enough to
> > check if you are going to redirect more than one edge or not.
> 
> thinking about it again, we never use the function in this situation.
> We use it to split loops with shared headers, and keeping just one edge
> pointing to the newly created forwarder block would obviously not be
> useful for this.  May I consider the patch approved then?
> 



So this is never called on a block with just one incoming edge and a
back edge? That situation would cause one argument PHI nodes in the new
dummy block. The new dummy block doesn't in fact need any PHI nodes
since only one edge is coming into it now.  All you need to do is change
the incoming edge in the existing PHI nodes in this case.

Can't that case happen?

Andrew


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