This is the mail archive of the
mailing list for the GCC project.
Re: [patch] basic_block.h: Move goto_locus from edge tobasic_block.
- 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: Mon, 08 Nov 2004 15:13:26 -0700
- Subject: Re: [patch] basic_block.h: Move goto_locus from edge tobasic_block.
- Organization: Red Hat, Inc
- References: <firstname.lastname@example.org>
- Reply-to: law at redhat dot com
On Mon, 2004-11-08 at 09:13 -0500, Kazu Hirata wrote:
> 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 <email@example.com>
> * 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):
> * 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).