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


Hi,

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.

Yes.  This change breakes a good invariant on calls, namely that the 
operand always is of pointer type (and hence can be changed from an 
SSA_NAME to the RHS of the definition of that SSA name quite generally).  
That invariant is used in quite some code (not the least of it simple 
propagation) so to retain that should be more important than saving one 
ADDR_EXPR tree.


Ciao,
Michael.


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