This is the mail archive of the
mailing list for the GCC project.
Re: [patch] for PR 18601 - Take 2
- From: Jeffrey A Law <law at redhat dot com>
- To: Kazu Hirata <kazu at cs dot umass dot edu>
- Cc: gcc-patches at gcc dot gnu dot org, dvorakz at suse dot cz
- Date: Mon, 06 Dec 2004 13:06:33 -0700
- Subject: Re: [patch] for PR 18601 - Take 2
- Organization: Red Hat, Inc
- References: <email@example.com>
- Reply-to: law at redhat dot com
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.