This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][TUPLES] Tuplification of tree-ssa-uncprop.c
- From: "Diego Novillo" <dnovillo at google dot com>
- To: "=?big5?b?RG91ZyBLd2FuICjD9q62vHcp?=" <dougkwan at google dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 14 Apr 2008 07:49:40 -0400
- Subject: Re: [PATCH][TUPLES] Tuplification of tree-ssa-uncprop.c
- References: <498552560804131310i35971cdbj55087185def85f54@mail.gmail.com>
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.