This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Properly disregard non-aliased variables in ref_maybe_used_by_call_p_1 and call_may_clobber_ref_p_1
- From: Richard Guenther <rguenther at suse dot de>
- To: Paolo Bonzini <bonzini at gnu dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 8 Apr 2009 10:45:24 +0200 (CEST)
- Subject: Re: [PATCH] Properly disregard non-aliased variables in ref_maybe_used_by_call_p_1 and call_may_clobber_ref_p_1
- References: <alpine.LNX.2.00.0904071614370.14773@zhemvz.fhfr.qr> <49DC4584.4010003@gnu.org>
On Wed, 8 Apr 2009, Paolo Bonzini wrote:
>
> > + /* If the reference is based on a decl that is not aliased the call
> > + cannot possibly clobber it. */
> > + /* But local non-readonly statics can be modified through recursion! */
>
> Isn't there a flag for subroutines in cgraph saying whether they're part
> of cycles (for static subroutines whose address is not taken)? If not,
> it would not be hard to implement in the pure-const pass and in any
> case, the builtin hack could be included there.
I don't know of such flag, but yes that would be useful in this case.
Richard.