This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tuples] code checking for tree expressions
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, rth at redhat dot com
- Date: Mon, 25 Sep 2006 14:08:20 -0400
- Subject: Re: [tuples] code checking for tree expressions
- References: <20060925173421.GA32327@redhat.com>
Aldy Hernandez wrote on 09/25/06 13:34:
> There are two uses of EXPR_P where I am not sure whether we should include
> GIMPLE_STMT_P:
>
> function.c: instantiate_expr
> dwarf2out.c: reference_to_unused
>
> My guess is yes, but I'd appreciate confirmation.
>
Hmm, EXPR_P and GIMPLE_STMT_P are not interchangeably in my view. I may
agree that every GIMPLE_STMT_P is an EXPR_P but not every EXPR_P is a
GIMPLE_STMT_P (PLUS_EXPR, ARRAY_REF, etc).
Keeping them separate as you are doing in the patch looks fine to me.
In fact, if we went so far as to say GIMPLE_STMT_P != EXPR_P, I think
that would be fine too.