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] Insert on edge comment


On Sat, 2003-05-31 at 16:06, Andrew MacLeod wrote:
> On Sat, 2003-05-31 at 12:41, Chris Lattner wrote:
> > 
> > > That's certainly true as well.  If you look at how we do this at the
> > > RTL level, you'll find that we don't split edges while in SSA form.
> > > Instead we queue things (such as edge insertions) and split the edge
> > > after we no longer need dominance info and PHI nodes.
> > 
> > Inserting on edges really isn't that hard if you realize that you only
> > need to change the CFG for insertion on _critical_ edges.  At critical
> > edges, the dominance properties are much simpler, and allow updating a lot
> > of data structures incrementally with only local knowledge (including PHI
> > nodes).  If you're interested in how we do it in LLVM, here is the source:
> > 
> 
> Its only critical edges that we've been talking about, I just never
> explicitly said that. The commit routines simply insert at the beginning
> or end of the appropriate block if the edge isn't critical.
> 

Actually, it just occurred to me.... thats all i have ever been talking
about actually.. is inserting on a critical edge... I guess I never
explicitly said that did I? :-)

I have a tendancy to only talk about the interesting parts, bypassing
the trivial bits since they seem obvious... Splitting critical edges is
the only interesting part of inserting on an edge.. the others are
turning into an insert_before (first_in_dest) or insert_after
(last_in_src) if the edge isn't critical.  

That might solve some of the confusion about the "complexity" of our
insert on edge :-)

Andrew


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