From patchwork Fri Jun 15 12:05:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [PR,tree-optimization/52558] : RFC: questions on store data race From: Aldy Hernandez X-Patchwork-Id: 165099 Message-Id: <4FDB24F2.60508@redhat.com> To: Eric Botcazou Cc: gcc-patches@gcc.gnu.org, Tobias Burnus Date: Fri, 15 Jun 2012 07:05:06 -0500 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 * tree-ssa-loop-im.c (execute_sm): Do not check flag_tm. * gimple.h (block_in_transaction): Check for flag_tm. 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. */