This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] tree-cfg.c: Clean up stmt_starts_bb_p.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]