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 Fri, 30 May 2003, Andrew MacLeod wrote:

> On Fri, 2003-05-30 at 20:14, Daniel Berlin wrote:
> >
> >
> > On Fri, 30 May 2003 law@redhat.com wrote:
>
> > >  >PRE will probably want to insert things on edge and commit them before
> > >  >we are done with PHI nodes :-)  I suspect I'll need to add PHI node
> > >  >updating as a flag to the commit routine.
> > > Yea.  I haven't really thought about how hard the incremental update
> > > will be.
> >
> > Well, PRE needs to see all the changes from an insertion immediately,
> > especially because it's necessary to keep the ssa up to
> > date and get strength reduction done properly.
> >
>
> Really? Doesn't that screw anything up when you insert on an edge and a
> new basic block mystically appears?
We don't insert on edges for this reason.
PRE doesn't *have* to insert on edges, it's just the way the RTL algorithm
is constructed.
In fact, most improvements to non-SSA PRE algorithms require BB based
PRE algorithms, or at least, were built for them.


> demand, but the magic new basic blocks screwed up some algorithms that
> looped through basic blocks.
> > >
> > > The only nice property about PRE (at least those that I've worked on) is
> > > that the stuff you're inserting on edges is straight-line code with no
> > > control flow changes.
> > We don't insert on edges almost ever.
> >
> really?  what about the "almost" :-)

Almost = it could insert on critical edges, but i have it mark the EPHI
not downsafe (IE and thus, non-partially available) in this case, so that
we don't ever try to insert on it.  Open64 does this as well.
This is because we expect all critical edges to be pre-split anyway if
you want optimization to occur across them, as the SSAPRE paper says.

We never insert new bb's during SSAPRE insertion, in other words.
Look at Open64, you'll see it does the same.
 >
> anyway, as long as straightline code is being done its not much of a
> deal. The multiple-commit routines are really wrappers around an
> on-demand edge insertion routine.
>
> We need a whole new family of routines for inserting flow. I have spent
> some time thinking about them.
>
> Andrew
>
>
>
>


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