This is the mail archive of the gcc@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]: out-of-ssa breaks if something adds a pred


On Fri, 2003-06-06 at 16:30, Chris Lattner wrote:
> > > OTOH, the inserter cannot possibly know how to update the PHI nodes,
> > > only
> > > the caller can.  If the caller doesn't know how to update the PHI
> > > nodes,
> > > something is seriously wrong.
> >
> > The inserter created the new bb and edges, it thus should know how to
> > update the phi nodes.
> 
> Oh, yes, well insertion-on-edges should automatically update the PHI
> nodes, because it _already has_ all of the information it needs... :)
> 
The current insert on edge routines, like the other inserts, do nothing
with PHIs. 

If I insert
   a_5 = b_6 * 2

on an edge, why should the insert routine have to update a PHI node? 
Maybe one of the PHI nodes is

  a_6 = PHI <a_2(3), a_3(4)>

How does the edge inserted know what the effect on this PHI node is?

Its the person inserting the code that knows what the effect, if any,
is. 

Oh, you mean xhanging the incoming edge if we split?. If we have the
above PHI, and we insert the same stmt on the edge from block 3, and we
create BB 8, then the PHI node needs to be updated to read:

  a_6 = PHI <a_2(8), a_3(4)>

Then the person inserting the code can go and make whatever change is
required (if any) for the definition of a_5...

This I intend to do, but havent yet since insert_on_edge was only being
used by out-of-ssa, so I didint care about that. It isnt hard...

Andrew


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