[patch] basic_block.h: Move goto_locus from edge to basic_block.

Jeffrey A Law law@redhat.com
Mon Nov 8 22:23:00 GMT 2004


On Mon, 2004-11-08 at 09:13 -0500, Kazu Hirata wrote:
> Hi,
> 
> Attached is a patch to move goto_locus from edge to basic_block.
> 
> goto_locus is a property of an implicit unconditional GOTO_EXPR, so it
> better belongs to a basic block, not an edge.
> 
> This should reduce memory consumption somewhat as there are fewer
> basic blocks than edges.
> 
> The idea for this patch was suggested by Steven Bosscher.
> 
> Tested on i686-pc-linux-gnu.  OK to apply?
> 
> Kazu Hirata
> 
> 2004-11-08  Kazu Hirata  <kazu@cs.umass.edu>
> 
> 	* basic-block.h (edge_def): Move goto_locus to ...
> 	(basic_block_def): ... here.
> 	* profile.c (branch_prob): Update references to goto_locus.
> 	* tree-cfg.c (make_goto_expr_edges, disband_implicit_edges):
> 	Likewise.
> 	* tree-pretty-print.c (dump_implicit_edges): Likewise.
It seems to me that the GOTO_LOCUS should remain a property of the
edge as we may have blocks with multiple outgoing implicit gotos
(COND_EXPRs for example if we get to a point where we're ready to
clear the true/false labels).

jeff




More information about the Gcc-patches mailing list