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] basic_block.h: Move goto_locus from edge tobasic_block.


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



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