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: [patch] for PR 18601 - Take 2

On Thu, 2004-12-02 at 19:46 -0500, Kazu Hirata wrote:

> The original remove_forwarder_block unconditionally searches for an
> abnormal incoming edge to BB's sole successor.  We want to know if we
> have such an edge only when BB also has an abnormal incoming edge.  My
> improvement cuts cuts down the running time of remove_forwarder_block
> dramatically (as much as 60% on insn-attrtab.i) by searching for an
> abnormal incoming edge to BB's sole successor only when needed.
Yea.  I had to sit down and think about this for a little while, but
I'm pretty sure your simplification is conservatively correct.

At the heart of the matter is the need to avoid inserting copies on
abnormal critical edges.  Meaning that we need to avoid creating 
overlapping lifetimes for objects in PHI nodes associated with
abnormal edges.  So the question we need to ask ourselves is
whether or not eliminating a forwarder block can create an overlapping
lifetime for objects appearing in PHI nodes at the destination of
the forwarder block.  Certainly the revised code to eliminate forwarder
blocks satisfies does not create these problematic overlapping
lifetimes, but I think we could actually be more aggressive with
this code in the future.

FWIW, the trick of moving the label to deal with abnormal edges is 
something I had also pondered when looking at speeding up edge
redirection for normal edges for pr15524.


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