This is the mail archive of the
mailing list for the GCC project.
Re: free is a killer
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Marc Glisse <marc dot glisse at inria dot fr>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 29 Oct 2013 16:15:12 +0100
- Subject: Re: free is a killer
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 02 dot 1310260837400 dot 32346 at stedding dot saclay dot inria dot fr> <526ED47C dot 6070404 at redhat dot com> <alpine dot DEB dot 2 dot 10 dot 1310282228150 dot 4104 at laptop-mg dot saclay dot inria dot fr> <526F493F dot 8080804 at redhat dot com> <CAFiYyc27eh3uCHxUKTzzzVxvzsT-_MV4bmpstS4gjOEKaxfjCA at mail dot gmail dot com> <526FCDC1 dot 4060702 at redhat dot com>
On Tue, Oct 29, 2013 at 4:01 PM, Jeff Law <firstname.lastname@example.org> wrote:
> On 10/29/13 04:40, Richard Biener wrote:
>> Of course in the example we have the "global memory" storage class
>> (incoming function argument) and "malloc memory" which is really
>> the same storage class. It only becomes a different storage class
>> if you factor in flow analysis (for which the current PTA code is weak
>> once you leave the SSA web).
> The global memory storage class is really better thought of as "i haven't a
> clue" class.
No, that's the "anything" class in the current PTA.
> You want a different class for things passed in as you know they can't
> conflict with anything in the current function's stack or anything malloc'd
> by the current function.
That's the NONLOCAL class in the current PTA. Which also means
that simple cases should work. It's only when the malloc result
escapes somewhere that it gets reachable by NONLOCAL because
of the limited flow-sensitiveness of PTA (and its lack of context sensitivity).