aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/basic-block.h8
-rw-r--r--gcc/gimple.h10
-rw-r--r--gcc/tree-ssa-loop-im.c2
4 files changed, 17 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c211db0..7465c4a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2013-11-06 Andrew MacLeod <amacleod@redhat.com>
+
+ * gimple.h (block_in_transaction): Move to basic-block.h and rename.
+ (gimple_in_transaction): Use bb_in_transaction.
+ * basic-block.h (bb_in_transaction): Relocate here and rename.
+ * tree-ssa-loop-im.c (execute_sm): Use bb_in_transaction.
+
2013-11-06 Richard Biener <rguenther@suse.de>
* tree.c (drop_tree_overflow): New function.
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index c88a39d..9c28f14 100644
--- a/gcc/basic-block.h
+++ b/gcc/basic-block.h
@@ -897,6 +897,14 @@ struct loop *get_loop_copy (struct loop *);
#include "cfghooks.h"
+/* Return true if BB is in a transaction. */
+
+static inline bool
+bb_in_transaction (basic_block bb)
+{
+ return bb->flags & BB_IN_TRANSACTION;
+}
+
/* Return true when one of the predecessor edges of BB is marked with EDGE_EH. */
static inline bool
bb_has_eh_pred (basic_block bb)
diff --git a/gcc/gimple.h b/gcc/gimple.h
index a548a5b..33e790c 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -1564,20 +1564,12 @@ gimple_set_has_volatile_ops (gimple stmt, bool volatilep)
stmt->gsbase.has_volatile_ops = (unsigned) volatilep;
}
-/* Return true if BB is in a transaction. */
-
-static inline bool
-block_in_transaction (basic_block bb)
-{
- return flag_tm && bb->flags & BB_IN_TRANSACTION;
-}
-
/* Return true if STMT is in a transaction. */
static inline bool
gimple_in_transaction (gimple stmt)
{
- return block_in_transaction (gimple_bb (stmt));
+ return bb_in_transaction (gimple_bb (stmt));
}
/* Return true if statement STMT may access memory. */
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c
index 0bcb520..339e7f2 100644
--- a/gcc/tree-ssa-loop-im.c
+++ b/gcc/tree-ssa-loop-im.c
@@ -1948,7 +1948,7 @@ execute_sm (struct loop *loop, vec<edge> exits, mem_ref_p ref)
fmt_data.orig_loop = loop;
for_each_index (&ref->mem.ref, force_move_till, &fmt_data);
- if (block_in_transaction (loop_preheader_edge (loop)->src)
+ if (bb_in_transaction (loop_preheader_edge (loop)->src)
|| !PARAM_VALUE (PARAM_ALLOW_STORE_DATA_RACES))
multi_threaded_model_p = true;