This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: cleanup for conversion exprs code patterns (1/16)
- From: Tomas Bily <tbily at suse dot cz>
- To: Richard Guenther <richard dot guenther at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, tbily at suse dot cz
- Date: Tue, 1 Apr 2008 14:46:02 +0200
- Subject: Re: [PATCH]: cleanup for conversion exprs code patterns (1/16)
- References: <20080331144912.C402CF00AB@atrey.karlin.mff.cuni.cz> <84fc9c000803310903p39fce391h5839bdfd762176c0@mail.gmail.com>
Hi,
> On Mon, Mar 31, 2008 at 3:49 PM, Tomas Bily
> <tomby@atrey.karlin.mff.cuni.cz> wrote:
> > Hi,
> >
> > this series of patches is doing small cleanup in using conversion
> > expressions code patterns. There is a lot of duplicate code patterns
> > for conversion expressions (CONVERT_EXPR, NOP_EXPR, NON_LVALUE_EXPR)
> > that can be substituted by macro. Patterns are:
> >
> > (TREE_CODE (EXP) == NOP_EXPR || TREE_CODE (EXP) == CONVERT_EXPR)
> > -> TEST_CONVERT_NOPS_P(EXP)
> > .....
>
> Sorry to spoil this again, but can you please only do the NOP_EXPR
> and CONVERT_EXPR tests and cases? And please use
Ok. I'll do it.
> CONVERT_EXPR_P and CASE_CONVERT instead of
> TEST_CONVERT_NOPS_P and CASE_CONVERT_NOPS.
Ok.
>
> NON_LVALUE_EXPRs should be removed without adding them
> to such grouping scheme first. I suggest you patch tree-cfg.c:verify_expr
> to handle it like
>
> NON_LVALUE_EXPR:
> gcc_unreachable ();
>
> as they shouldn't survive until the middle-end IL (and thus handling for
> it can be safely removed from all places once the verify_expr patch
> bootstraps & tests cleanly). But please separate NON_LVALUE_EXPR
> handling out into a separate patch(-series).
Ok. I'll make new patch for NON_LVALUE_EXPR first.
Greetings
Tomas