Patchwork PR other/51165: add new adress_escapes predicate

login
register
mail settings
Submitter Aldy Hernandez
Date Jan. 18, 2012, 2 p.m.
Message ID <4F16D07D.6040405@redhat.com>
Download mbox | patch
Permalink /patch/136613/
State New
Headers show

Comments

Aldy Hernandez - Jan. 18, 2012, 2 p.m.
>> 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_memory until we eliminate
>>              lower_sequence_tm altogether.  */
>>           needs_to_live_in_memory (x)
>> -         /* X escapes.  */
>> -         || is_global_var (x))
>
> True, because needs_to_live_in_memory is true for all global vars already
> (and includes all address-taken automatic vars as well, thus may_be_aliased (x),
> too).

Sweet.  Thanks guys.

Richard, I assume you are OK with this?

Tested on x86-64 Linux.
* trans-mem.c (requires_barrier): Remove call to is_global_var.
Richard Guenther - Jan. 18, 2012, 2:09 p.m.
On Wed, Jan 18, 2012 at 3:00 PM, Aldy Hernandez <aldyh@redhat.com> 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 @@ requires_barrier (basic_block entry_block, tree x,
>>>             to needs_to_live_in_memory until we eliminate
>>>             lower_sequence_tm altogether.  */
>>>          needs_to_live_in_memory (x)
>>> -         /* X escapes.  */
>>> -         || is_global_var (x))
>>
>>
>> True, because needs_to_live_in_memory is true for all global vars already
>> (and includes all address-taken automatic vars as well, thus
>> may_be_aliased (x),
>> too).
>
>
> Sweet.  Thanks guys.
>
> Richard, I assume you are OK with this?

Yes.

Richard.

> Tested on x86-64 Linux.

Patch

Index: trans-mem.c
===================================================================
--- trans-mem.c	(revision 183272)
+++ trans-mem.c	(working copy)
@@ -1496,9 +1496,7 @@  requires_barrier (basic_block entry_bloc
 	     during lower_sequence_tm/gimplification, leave the call
 	     to needs_to_live_in_memory until we eliminate
 	     lower_sequence_tm altogether.  */
-	  needs_to_live_in_memory (x)
-	  /* X escapes.  */
-	  || is_global_var (x))
+	  needs_to_live_in_memory (x))
 	return true;
       else
 	{