The following makes us honor PARAM_ALLOW_STORE_DATA_RACES instead of
making -ftree-loop-if-convert-stores an if-conversion specific "alias"
of that.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.

I've also verified it passes SPEC CPU 2006 on x86_64.

Richard.

2015-12-10  Richard Biener  <rguent...@suse.de>

        * tree-if-conv.c: Include params.h.
        (ifcvt_memrefs_wont_trap): Use PARAM_ALLOW_STORE_DATA_RACES
        instead of flag_tree_loop_if_convert_stores to guard cases
        we'd introduce store-data-races.

Index: gcc/tree-if-conv.c
===================================================================
--- gcc/tree-if-conv.c  (revision 231493)
+++ gcc/tree-if-conv.c  (working copy)
@@ -112,6 +112,7 @@ along with GCC; see the file COPYING3.
 #include "tree-hash-traits.h"
 #include "varasm.h"
 #include "builtins.h"
+#include "params.h"
 
 /* List of basic blocks in if-conversion-suitable order.  */
 static basic_block *ifc_bbs;
@@ -714,7 +715,7 @@ ifcvt_memrefs_wont_trap (gimple *stmt, v
          to unconditionally.  */
       if (base_master_dr
          && DR_BASE_W_UNCONDITIONALLY (*base_master_dr))
-       return flag_tree_loop_if_convert_stores;
+       return PARAM_VALUE (PARAM_ALLOW_STORE_DATA_RACES);
       else
        {
          /* or the base is know to be not readonly.  */
@@ -722,7 +723,7 @@ ifcvt_memrefs_wont_trap (gimple *stmt, v
          if (DECL_P (base_tree)
              && decl_binds_to_current_def_p (base_tree)
              && ! TREE_READONLY (base_tree))
-           return flag_tree_loop_if_convert_stores;
+           return PARAM_VALUE (PARAM_ALLOW_STORE_DATA_RACES);
        }
     }
   return false;

Reply via email to