aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple.h
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2012-02-28 20:08:39 +0000
committerAldy Hernandez <aldyh@gcc.gnu.org>2012-02-28 20:08:39 +0000
commit19c0d7df9931c87307ca1eaae37b266e249b39d7 (patch)
tree780606e8e39dbc758d4c2e3c28e49951fa7b82fc /gcc/gimple.h
parentca45d3d56d8760eb36b8cf04cf8c89f01e03d93c (diff)
downloadgcc-19c0d7df9931c87307ca1eaae37b266e249b39d7.zip
gcc-19c0d7df9931c87307ca1eaae37b266e249b39d7.tar.gz
gcc-19c0d7df9931c87307ca1eaae37b266e249b39d7.tar.bz2
re PR middle-end/51752 (trans-mem: publication safety violated)
PR middle-end/51752 * gimple.h (gimple_in_transaction): New. (gimple_set_in_transaction): New. (struct gimple_statement_base): Add in_transaction field. * tree-ssa-loop-im.c: (movement_possibility): Restrict movement of transaction loads. (tree_ssa_lim_initialize): Compute transaction bits. * tree.h (compute_transaction_bits): Protoize. * trans-mem.c (tm_region_init): Use the heap to store BB auxilliary data. (compute_transaction_bits): New. From-SVN: r184638
Diffstat (limited to 'gcc/gimple.h')
-rw-r--r--gcc/gimple.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/gcc/gimple.h b/gcc/gimple.h
index b2b345e..92edd18 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -305,8 +305,10 @@ struct GTY(()) gimple_statement_base {
/* Nonzero if this statement contains volatile operands. */
unsigned has_volatile_ops : 1;
- /* Padding to get subcode to 16 bit alignment. */
- unsigned pad : 1;
+ /* Nonzero if this statement appears inside a transaction. This bit
+ is calculated on de-mand and has relevant information only after
+ it has been calculated with compute_transaction_bits. */
+ unsigned in_transaction : 1;
/* The SUBCODE field can be used for tuple-specific flags for tuples
that do not require subcodes. Note that SUBCODE should be at
@@ -1120,6 +1122,7 @@ extern tree omp_reduction_init (tree, tree);
/* In trans-mem.c. */
extern void diagnose_tm_safe_errors (tree);
+extern void compute_transaction_bits (void);
/* In tree-nested.c. */
extern void lower_nested_functions (tree);
@@ -1584,6 +1587,21 @@ gimple_set_has_volatile_ops (gimple stmt, bool volatilep)
stmt->gsbase.has_volatile_ops = (unsigned) volatilep;
}
+/* Return true if STMT is in a transaction. */
+
+static inline bool
+gimple_in_transaction (gimple stmt)
+{
+ return stmt->gsbase.in_transaction;
+}
+
+/* Set the IN_TRANSACTION flag to TRANSACTIONP. */
+
+static inline void
+gimple_set_in_transaction (gimple stmt, bool transactionp)
+{
+ stmt->gsbase.in_transaction = (unsigned) transactionp;
+}
/* Return true if statement STMT may access memory. */