This is the mail archive of the
mailing list for the GCC project.
Re: [patch] tree-if-conv.c: Use edges instead of labels.
- 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: Tue, 09 Nov 2004 09:39:24 -0700
- Subject: Re: [patch] tree-if-conv.c: Use edges instead of labels.
- Organization: Red Hat, Inc
- References: <firstname.lastname@example.org>
- Reply-to: law at redhat dot com
On Sun, 2004-11-07 at 20:07 -0500, Kazu Hirata wrote:
> Attached is a patch to teach tree_if_convert_cond_expr to use edges
> instead of labels.
> tree_if_convert_cond_expr passes GOTO_EXPR in each arm of COND_EXPR to
> add_to_dst_predicate_list, which immediately converts the label
> appearing in the GOTO_EXPR to basic_block like so
> bb = label_to_block (TREE_OPERAND (dst, 0));
> Since we want to apply transformations based on CFG, use of labels is
> against the trend. With the patch, tree_if_convert_cond_expr passes
> basic_block directly to add_to_dst_predicate_list instead.
> This is hopefully the last place that still uses labels of COND_EXPR
> other than the pretty print stuff and the expanders.
> Tested on i686-pc-linux-gnu on top of
> OK to apply?
> Kazu Hirata
> 2004-11-08 Kazu Hirata <email@example.com>
> * tree-if-conv.c (add_to_dst_predicate_list): Change the
> second argument to basic_block.
> (tree_if_convert_cond_expr): Update call sites.