diff options
author | Richard Henderson <rth@redhat.com> | 2012-01-25 12:35:34 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2012-01-25 12:35:34 -0800 |
commit | 3be18e47c33b61365786831e0f967f42b09922c9 (patch) | |
tree | 27e1bb53de99cb62583995cbc7df688049897056 /gcc/trans-mem.c | |
parent | dda6ecaea8be6f0dd4a3b7ca5498698702a32ecf (diff) | |
download | gcc-3be18e47c33b61365786831e0f967f42b09922c9.zip gcc-3be18e47c33b61365786831e0f967f42b09922c9.tar.gz gcc-3be18e47c33b61365786831e0f967f42b09922c9.tar.bz2 |
Revert * trans-mem.c (requires_barrier): Do not instrument thread local
variables and emit save/restore for them.
From-SVN: r183538
Diffstat (limited to 'gcc/trans-mem.c')
-rw-r--r-- | gcc/trans-mem.c | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c index 06b1d81..de7a913 100644 --- a/gcc/trans-mem.c +++ b/gcc/trans-mem.c @@ -1,5 +1,5 @@ /* Passes for transactional memory support. - Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. + Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -1488,18 +1488,7 @@ requires_barrier (basic_block entry_block, tree x, gimple stmt) } if (is_global_var (x)) - { - if (DECL_THREAD_LOCAL_P (x)) - goto thread_local; - if (DECL_HAS_VALUE_EXPR_P (x)) - { - tree value = get_base_address (DECL_VALUE_EXPR (x)); - - if (value && DECL_P (value) && DECL_THREAD_LOCAL_P (value)) - goto thread_local; - } - return !TREE_READONLY (x); - } + return !TREE_READONLY (x); if (/* FIXME: This condition should actually go below in the tm_log_add() call, however is_call_clobbered() depends on aliasing info which is not available during @@ -1509,14 +1498,17 @@ requires_barrier (basic_block entry_block, tree x, gimple stmt) lower_sequence_tm altogether. */ needs_to_live_in_memory (x)) return true; - thread_local: - /* For local memory that doesn't escape (aka thread private memory), - we can either save the value at the beginning of the transaction and - restore on restart, or call a tm function to dynamically save and - restore on restart (ITM_L*). */ - if (stmt) - tm_log_add (entry_block, orig, stmt); - return false; + else + { + /* For local memory that doesn't escape (aka thread private + memory), we can either save the value at the beginning of + the transaction and restore on restart, or call a tm + function to dynamically save and restore on restart + (ITM_L*). */ + if (stmt) + tm_log_add (entry_block, orig, stmt); + return false; + } default: return false; |