Re: free is a killer

2013-10-29 Thread Jeff Law
On 10/29/13 00:38, Marc Glisse wrote: On Mon, 28 Oct 2013, Jeff Law wrote: On 10/28/13 16:05, Marc Glisse wrote: I checked and it does the wrong thing (I don't have the testcase handy anymore, but it shouldn't be hard to recreate one), I even wrote a patch (attached) but it is related to: htt

Re: free is a killer

2013-10-29 Thread Jeff Law
On 10/29/13 00:38, Marc Glisse wrote: Indeed. Do you want to commit it xfailed or put it in bugzilla so we don't lose it? (it becomes harder if you replace p with p-1 in the memset arguments). I'll either add it as xfailed, or I'll add it as-is if I fix the alias code. It'd primarly be to add

Re: free is a killer

2013-10-29 Thread Jeff Law
On 10/29/13 09:15, Richard Biener wrote: On Tue, Oct 29, 2013 at 4:01 PM, Jeff Law 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 o

Re: free is a killer

2013-10-29 Thread Richard Biener
On Tue, Oct 29, 2013 at 4:01 PM, Jeff Law 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 storag

Re: free is a killer

2013-10-29 Thread Jeff Law
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 PT

Re: free is a killer

2013-10-29 Thread Richard Biener
On Tue, Oct 29, 2013 at 6:35 AM, Jeff Law wrote: > On 10/28/13 16:05, Marc Glisse wrote: >> >> >> I checked and it does the wrong thing (I don't have the testcase handy >> anymore, but it shouldn't be hard to recreate one), I even wrote a patch >> (attached) but it is related to: >> http://gcc.gnu

Re: free is a killer

2013-10-29 Thread Richard Biener
On Mon, Oct 28, 2013 at 11:05 PM, Marc Glisse wrote: > On Mon, 28 Oct 2013, Jeff Law wrote: > >> On 10/26/13 01:15, Marc Glisse wrote: >>> >>> Hello, >>> >>> this patch teaches gcc that free kills the memory its argument points >>> to. The equality test is probably too strict, I guess we can loose

Re: free is a killer

2013-10-28 Thread Marc Glisse
On Mon, 28 Oct 2013, Jeff Law wrote: On 10/28/13 16:05, Marc Glisse wrote: I checked and it does the wrong thing (I don't have the testcase handy anymore, but it shouldn't be hard to recreate one), I even wrote a patch (attached) but it is related to: http://gcc.gnu.org/ml/gcc-patches/2013-10/

Re: free is a killer

2013-10-28 Thread Jeff Law
On 10/28/13 16:05, Marc Glisse wrote: I checked and it does the wrong thing (I don't have the testcase handy anymore, but it shouldn't be hard to recreate one), I even wrote a patch (attached) but it is related to: http://gcc.gnu.org/ml/gcc-patches/2013-10/msg02238.html so it can't go in. A more

Re: free is a killer

2013-10-28 Thread Marc Glisse
On Mon, 28 Oct 2013, Jeff Law wrote: On 10/26/13 01:15, Marc Glisse wrote: Hello, this patch teaches gcc that free kills the memory its argument points to. The equality test is probably too strict, I guess we can loosen it later (unless you have suggestions?). Note that the corresponding code

Re: free is a killer

2013-10-28 Thread Jeff Law
On 10/26/13 01:15, Marc Glisse wrote: Hello, this patch teaches gcc that free kills the memory its argument points to. The equality test is probably too strict, I guess we can loosen it later (unless you have suggestions?). Note that the corresponding code for BUILT_IN_MEMCPY and others seems s

free is a killer

2013-10-26 Thread Marc Glisse
Hello, this patch teaches gcc that free kills the memory its argument points to. The equality test is probably too strict, I guess we can loosen it later (unless you have suggestions?). Note that the corresponding code for BUILT_IN_MEMCPY and others seems suspicious to me, it looks like it i