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: Fix builtin folding


Hi Jan,

On Thu, 26 Oct 2006, Jan Hubicka wrote:
> this problem kept me walking in circles for a few days...

Hehe.

> 2006-10-26  Jan Hubicka  <jh@suse.cz>
>
> 	* builtins.c (fold_builtin): Don't generate NOP_EXPR that is going
> 	to be thrown away soon when IGNORE is set.
> 	* tree-ssa-ccp.c (convert_to_gimple_builtin): Add IGNORE argument
> 	indicating when return value shall not be computed.
> 	* gimplify.c (internal_get_tmp_var): Avoid random tree sharing.

This looks reasonable as far as it goes.  It turns out that this no-op
NOP_EXPR is created as somewhere to set the TREE_NO_WARNING flag purely
for the benefit of gimplification.  See PR tree-ssa/13325.  There's now
the strong possibility that improvements and refactorings to GCC's
gimplification process, especially this latest change of yours, means
that it's no longer required at all.

To make life simple, I'll approve your current patch as-is, provided
that you also test a follow-up clean-up patch that deletes the current
fold_builtin wrapper function, and instead renames/exposes the current
fold_builtin_1 as fold_builtin.  If there are no testsuite regresions
(especially g++.dg/warn/noeffect5.C and gcc.dg/20040202-1.c) with that
change, its pre-approved for mainline.

Thanks for investigating this.

Roger
--


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