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.

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
        {

Reply via email to