This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] tree-cfg.c: Clean up stmt_starts_bb_p.
- From: Jeffrey A Law <law at redhat dot com>
- To: Kazu Hirata <kazu at cs dot umass dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 03 Mar 2005 09:31:45 -0700
- Subject: Re: [patch] tree-cfg.c: Clean up stmt_starts_bb_p.
- Organization: Red Hat, Inc
- References: <20050303.092939.91313321.kazu@cs.umass.edu>
- Reply-to: law at redhat dot com
On Thu, 2005-03-03 at 09:29 -0500, Kazu Hirata wrote:
> Hi,
>
> Attached is a patch to clean up stmt_starts_bb_p.
>
> Consider:
>
> code = TREE_CODE (t);
> if (code == LABEL_EXPR)
>
> We can just write this as
>
> if (TREE_CODE (t) == LABEL_EXPR)
>
> Note that under the "if" statement, we always have code == LABEL_EXPR,
> so the patch replaces code with LABEL_EXPR.
>
> Tested on i686-pc-linux-gnu. Committed as obvious.
>
> Kazu Hirata
>
> 2005-03-03 Kazu Hirata <kazu@cs.umass.edu>
>
> * tree-cfg.c (stmt_starts_bb_p): Clean up by replacing code
> with LABEL_EXPR.
This is fine as a cleanup. I don't think it will have any affect on
the generated code as DOM should have const-propagated LABEL_EXPR for
code inside the IF conditional.
Thanks,
jeff