This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] cfg.c: Factor out common code.
- 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
- Date: Wed, 02 Mar 2005 11:26:09 -0700
- Subject: Re: [patch] cfg.c: Factor out common code.
- Organization: Red Hat, Inc
- References: <20050302.083635.48806617.kazu@cs.umass.edu>
- Reply-to: law at redhat dot com
On Wed, 2005-03-02 at 08:36 -0500, Kazu Hirata wrote:
> Hi,
>
> Attached is a patch to factor out common code in cfg.c.
>
> Several edge manipulation functions have duplicate code to
> connect/disconnect an edge to/from an edge vector.
>
> The patch factors out the duplicate code by creating four new
> functions:
>
> connect_src,
> connect_dest,
> disconnect_src, and
> disconnct_dest.
>
> Note that my recent introduction of dest_idx made handling of pred
> edge vector and succ edge vector asymmetric. This patch hides the
> asymmetry from the users of the new functions.
>
> Tested on i686-pc-linux-gnu. OK to apply?
>
> Kazu Hirata
>
> 2005-03-02 Kazu Hirata <kazu@cs.umass.edu>
>
> * cfg.c (connect_src, connect_dest, disconnect_src,
> disconnct_dest): New.
> (unchecked_make_edge, remove_edge, redirect_edge_succ,
> redirect_edge_pred): Use the new functions.
This is fine for mainline. Please install.
Thanks,
Jeff