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] tree-if-conv.c: Use edges instead of labels.


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



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