This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix parts of PR37046
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Diego Novillo <dnovillo at google dot com>
- Date: Fri, 8 Aug 2008 12:18:29 +0200 (CEST)
- Subject: Re: [PATCH] Fix parts of PR37046
- References: <alpine.LNX.1.10.0808081211070.3427@zhemvz.fhfr.qr>
On Fri, 8 Aug 2008, Richard Guenther wrote:
>
> During propagation of function addresses (ADDR_EXR <fndecl>) into the
> function slot of a gimple call expression we fail to strip the ADDR_EXPR
> which causes gimple_call_get_fndecl to return NULL. This causes
> the testcase below to fail even though CCP is able to enable the inlining
> of foo ().
>
> Diego, I expect there will be some more places we have to deal with
> this change in canonicalization of calls to fndecls (we might want to
> add some stmt checking for that, but as I know the inliner messes this
> up as well I'll wait until after that is fixed). Maybe you have
> some opinion on these kind of fixes? ...
My opinion is we should revert this change in canonicalization and
go back to storing ADDR_EXPR <fndecl> in the GIMPLE_CALL. The patch
breaks gcc.dg/tree-ssa/ssa-pre-12.c and
gcc.dg/tree-ssa/ssa-pre-13.c which means that SCCVN and/or PRE needs
similar "fixing" otherwise.
Richard.