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] Properly disregard non-aliased variables in ref_maybe_used_by_call_p_1 and call_may_clobber_ref_p_1


On Wed, Apr 8, 2009 at 4:47 AM, Richard Guenther <rguenther@suse.de> wrote:
> On Tue, 7 Apr 2009, Daniel Berlin wrote:
>
>> On Tue, Apr 7, 2009 at 10:17 AM, Richard Guenther <rguenther@suse.de> wrote:
>> >
>> > non-aliased variables are not used by calls if they are not passed
>> > by value. ?Likewise non-aliased variables are not clobbered by calls.
>> >
>> > The complication starts with local statics (as I looked at the
>> > 189.lucas regression I noticed most variables there are saved). ?But
>> > here we can avoid clobbering by malloc calls by assuming that calls
>> > to builtin function will not re-enter the current function (and thus
>> > read or clobber local statics). ?At least if we are not also a builtin
>> > function.
>>
>> Err, seems better to make a set of properties each function has (like
>> it doesn't call visible functions) and use that, than make assumptions
>> about builtins in a special place.
>> Especially since you didn't document this anywhere, what is going to
>> prevent people from writing a builtin that does this?
>
> Common sense I guess (at least I cannot think of a useful builtin
> that would recurse into its caller).

builtin_longjmp?


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