[patch] tree-if-conv.c: Use edges instead of labels.
Jeffrey A Law
law@redhat.com
Tue Nov 9 16:42:00 GMT 2004
On Sun, 2004-11-07 at 20:07 -0500, Kazu Hirata wrote:
> Hi,
>
> 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
>
> http://gcc.gnu.org/ml/gcc-patches/2004-11/msg00535.html
>
> OK to apply?
>
> Kazu Hirata
>
> 2004-11-08 Kazu Hirata <kazu@cs.umass.edu>
>
> * tree-if-conv.c (add_to_dst_predicate_list): Change the
> second argument to basic_block.
> (tree_if_convert_cond_expr): Update call sites.
OK.
jeff
More information about the Gcc-patches
mailing list