Patchwork [PR,tree-optimization/52558] : RFC: questions on store data race

login
register
mail settings
Submitter Aldy Hernandez
Date June 15, 2012, 12:05 p.m.
Message ID <4FDB24F2.60508@redhat.com>
Download mbox | patch
Permalink /patch/165099/
State New
Headers show

Comments

Aldy Hernandez - June 15, 2012, 12:05 p.m.
On 06/15/12 06:40, Eric Botcazou wrote:
>> Whoops, I forgot to commit that last patch.  Check now.
>
> The warning is there on the 4.7 branch now.
>

Arghhh, that's the second time.  I wonder why the warning doesn't show 
up on my bootstraps.

Anyway, committed the attached patch to branch.
Backport from mainline:
	2012-05-31  Aldy Hernandez  <aldyh@redhat.com>
	* tree-ssa-loop-im.c (execute_sm): Do not check flag_tm.
	* gimple.h (block_in_transaction): Check for flag_tm.

Patch

Index: tree-ssa-loop-im.c
===================================================================
--- tree-ssa-loop-im.c	(revision 188631)
+++ tree-ssa-loop-im.c	(working copy)
@@ -2154,7 +2154,7 @@  execute_sm (struct loop *loop, VEC (edge
   fmt_data.orig_loop = loop;
   for_each_index (&ref->mem, force_move_till, &fmt_data);
 
-  if ((flag_tm && block_in_transaction (loop_preheader_edge (loop)->src))
+  if (block_in_transaction (loop_preheader_edge (loop)->src)
       || !PARAM_VALUE (PARAM_ALLOW_STORE_DATA_RACES))
     multi_threaded_model_p = true;
 
Index: gimple.h
===================================================================
--- gimple.h	(revision 188631)
+++ gimple.h	(working copy)
@@ -1587,7 +1587,7 @@  gimple_set_has_volatile_ops (gimple stmt
 static inline bool
 block_in_transaction (basic_block bb)
 {
-  return bb->flags & BB_IN_TRANSACTION;
+  return flag_tm && bb->flags & BB_IN_TRANSACTION;
 }
 
 /* Return true if STMT is in a transaction.  */