This is the mail archive of the gcc-patches@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: [patch] cfg.c: Factor out common code.


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



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