Commit 7783daa7 by Andrew MacLeod Committed by Andrew Macleod

gimple.h (block_in_transaction): Move to basic-block.h and rename.


	* 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.

From-SVN: r204455
parent 3f5c390d
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> 2013-11-06 Richard Biener <rguenther@suse.de>
* tree.c (drop_tree_overflow): New function. * tree.c (drop_tree_overflow): New function.
...@@ -897,6 +897,14 @@ struct loop *get_loop_copy (struct loop *); ...@@ -897,6 +897,14 @@ struct loop *get_loop_copy (struct loop *);
#include "cfghooks.h" #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. */ /* Return true when one of the predecessor edges of BB is marked with EDGE_EH. */
static inline bool static inline bool
bb_has_eh_pred (basic_block bb) bb_has_eh_pred (basic_block bb)
......
...@@ -1564,20 +1564,12 @@ gimple_set_has_volatile_ops (gimple stmt, bool volatilep) ...@@ -1564,20 +1564,12 @@ gimple_set_has_volatile_ops (gimple stmt, bool volatilep)
stmt->gsbase.has_volatile_ops = (unsigned) 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. */ /* Return true if STMT is in a transaction. */
static inline bool static inline bool
gimple_in_transaction (gimple stmt) 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. */ /* Return true if statement STMT may access memory. */
......
...@@ -1948,7 +1948,7 @@ execute_sm (struct loop *loop, vec<edge> exits, mem_ref_p ref) ...@@ -1948,7 +1948,7 @@ execute_sm (struct loop *loop, vec<edge> exits, mem_ref_p ref)
fmt_data.orig_loop = loop; fmt_data.orig_loop = loop;
for_each_index (&ref->mem.ref, force_move_till, &fmt_data); 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)) || !PARAM_VALUE (PARAM_ALLOW_STORE_DATA_RACES))
multi_threaded_model_p = true; multi_threaded_model_p = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment