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][TUPLES] Tuplification of tree-ssa-uncprop.c


On Sun, Apr 13, 2008 at 16:10, Doug Kwan (關振紱) <dougkwan@google.com> wrote:

>  	  /* If the conditional is a single variable 'X', record 'X = 1'
>  	     for the true edge and 'X = 0' on the false edge.  */
> -	  if (TREE_CODE (cond) == SSA_NAME
> -	      && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (cond))
> +	  if (code == SSA_NAME
> +	      && !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (gimple_cond_lhs (stmt)))
>  	    {
> +	      tree cond = gimple_cond_lhs (stmt);

This cannot happen.  All GIMPLE conditional expressions are
canonically OP0 RELOP OP1, so CODE can never be an SSA_NAME. You
can simply remove this case.

> -	      tree labels = SWITCH_LABELS (stmt);
> -	      int i, n_labels = TREE_VEC_LENGTH (labels);
> +	      int i, n_labels = gimple_switch_num_labels (stmt);

Variables I and N_LABELS should be of type size_t.

OK with those changes.


Diego.


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