PR other/51165: add new adress_escapes predicate

2012-01-16 Thread Aldy Hernandez
As discussed in the PR, the problem here is that we are using ptr_deref_may_alias_global_p() to determine if a dereferenced address escapes, whereas we were previously using the now non existent is_call_clobbered. The function ptr_deref_may_alias_global_p() does not understand SSA_NAMEs, where

Re: PR other/51165: add new adress_escapes predicate

2012-01-16 Thread Richard Guenther
On Mon, Jan 16, 2012 at 3:29 PM, Aldy Hernandez wrote: > As discussed in the PR, the problem here is that we are using > ptr_deref_may_alias_global_p() to determine if a dereferenced address > escapes, whereas we were previously using the now non existent > is_call_clobbered.  The function ptr_der

Re: PR other/51165: add new adress_escapes predicate

2012-01-16 Thread Aldy Hernandez
Not really - you handle both ptr and *ptr in the same predicate and call both "address escaped". What I suggested was sth like I think I confused myself and you by asking the wrong question in the first place. Actually, what I want is to handle VAR_DECL correctly, and your original sugges

Re: PR other/51165: add new adress_escapes predicate

2012-01-17 Thread Richard Guenther
On Mon, Jan 16, 2012 at 4:58 PM, Aldy Hernandez wrote: > >> Not really - you handle both ptr and *ptr in the same predicate and >> call both "address escaped".  What I suggested was sth like > > > I think I confused myself and you by asking the wrong question in the first > place. > > Actually, wh

Re: PR other/51165: add new adress_escapes predicate

2012-01-17 Thread Aldy Hernandez
On 01/17/12 03:09, Richard Guenther wrote: On Mon, Jan 16, 2012 at 4:58 PM, Aldy Hernandez wrote: Not really - you handle both ptr and *ptr in the same predicate and call both "address escaped". What I suggested was sth like I think I confused myself and you by asking the wrong question i

Re: PR other/51165: add new adress_escapes predicate

2012-01-17 Thread Patrick Marlier
On 01/17/2012 08:20 AM, Aldy Hernandez wrote: On 01/17/12 03:09, Richard Guenther wrote: On Mon, Jan 16, 2012 at 4:58 PM, Aldy Hernandez wrote: Not really - you handle both ptr and *ptr in the same predicate and call both "address escaped". What I suggested was sth like I think I confused

Re: PR other/51165: add new adress_escapes predicate

2012-01-18 Thread Richard Guenther
On Tue, Jan 17, 2012 at 5:41 PM, Patrick Marlier wrote: > On 01/17/2012 08:20 AM, Aldy Hernandez wrote: >> >> On 01/17/12 03:09, Richard Guenther wrote: >>> >>> On Mon, Jan 16, 2012 at 4:58 PM, Aldy Hernandez wrote: > Not really - you handle both ptr and *ptr in the same predicate an

Re: PR other/51165: add new adress_escapes predicate

2012-01-18 Thread Aldy Hernandez
So you can do probably the following: Index: trans-mem.c === --- trans-mem.c (revision 183253) +++ trans-mem.c (working copy) @@ -1497,8 +1497,6 @@ requires_barrier (basic_block entry_block, tree x, to needs_to_live_in

Re: PR other/51165: add new adress_escapes predicate

2012-01-18 Thread Richard Guenther
On Wed, Jan 18, 2012 at 3:00 PM, Aldy Hernandez wrote: > >>> So you can do probably the following: >>> >>> Index: trans-mem.c >>> === >>> --- trans-mem.c (revision 183253) >>> +++ trans-mem.c (working copy) >>> @@ -1497,8 +1497,6 @@ r