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] Fix parts of PR37046


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.


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