------- Comment #2 from rguenther at suse dot de  2009-04-08 16:21 -------
Subject: Re:  IPA should compute if a function
 may recurse

On Wed, 8 Apr 2009, hubicka at ucw dot cz wrote:

> ------- Comment #1 from hubicka at ucw dot cz  2009-04-08 16:10 -------
> Subject: Re:   New: IPA should compute if a function may recurse
> 
> While testing for possible recurssion can definitly be added (and it
> will return true on everything that might lead to call outsie of visible
> unit), there is problem with using it on local statics.
>
> Inlining of function can distribute use of local static pretty much
> everywhere, so value of origin of local static for optimization is quite
> zero.  Of course one can track what functions reffers to the given
> variable and then one needs to track if function A referring to it might
> call to any of the others referring to it direclty or indirectly.

Hmm, but will the inlined function not still be visible as such in
the cycle?  So what I want to know is whether the local static is
referred to in any function the function calls (thus, a more
complete analysis would be performed by IPA mod-ref anyway).

> Isn't this however exactly same as asking ipa-pureconst bit?

No.  The called function may read and clobber memory, I just want
to be able to check if a local static variable "escaped" even
if its address was not taken (thus, we recursed).

Richard.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39689

Reply via email to