[PATCH][TUPLES] Tuplification of tree-ssa-uncprop.c

Diego Novillo dnovillo@google.com
Mon Apr 14 11:53:00 GMT 2008


On Sun, Apr 13, 2008 at 16:10, Doug Kwan ($Bop?6y~(B) <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.



More information about the Gcc-patches mailing list