2014-06-26 Martin Jambor <mjambor@suse.cz>
* params.def (PARAM_ALLOW_LOAD_DATA_RACES) (PARAM_ALLOW_PACKED_LOAD_DATA_RACES) (PARAM_ALLOW_PACKED_STORE_DATA_RACES): Removed. (PARAM_ALLOW_STORE_DATA_RACES): Set default to zero. * opts.c (default_options_optimization): Set PARAM_ALLOW_STORE_DATA_RACES to one at -Ofast. * doc/invoke.texi (allow-load-data-races) (allow-packed-load-data-races, allow-packed-store-data-races): Removed. (allow-store-data-races): Document the new default. testsuite/ * g++.dg/simulate-thread/bitfields-2.C: Remove allow-load-data-races parameter. * g++.dg/simulate-thread/bitfields.C: Likewise. * gcc.dg/simulate-thread/strict-align-global.c: Remove allow-packed-store-data-races parameter. * gcc.dg/simulate-thread/subfields.c: Likewise. * gcc.dg/tree-ssa/20050314-1.c: Set parameter allow-store-data-races to one. From-SVN: r212034
This commit is contained in:
parent
a5ad7492f8
commit
680a5a7c02
@ -1,3 +1,16 @@
|
||||
2014-06-26 Martin Jambor <mjambor@suse.cz>
|
||||
|
||||
* params.def (PARAM_ALLOW_LOAD_DATA_RACES)
|
||||
(PARAM_ALLOW_PACKED_LOAD_DATA_RACES)
|
||||
(PARAM_ALLOW_PACKED_STORE_DATA_RACES): Removed.
|
||||
(PARAM_ALLOW_STORE_DATA_RACES): Set default to zero.
|
||||
* opts.c (default_options_optimization): Set
|
||||
PARAM_ALLOW_STORE_DATA_RACES to one at -Ofast.
|
||||
* doc/invoke.texi (allow-load-data-races)
|
||||
(allow-packed-load-data-races, allow-packed-store-data-races):
|
||||
Removed.
|
||||
(allow-store-data-races): Document the new default.
|
||||
|
||||
2014-06-26 Martin Jambor <mjambor@suse.cz>
|
||||
|
||||
* ipa-prop.c (ipa_impossible_devirt_target): No longer static,
|
||||
|
@ -10176,25 +10176,10 @@ The maximum number of conditional stores paires that can be sunk. Set to 0
|
||||
if either vectorization (@option{-ftree-vectorize}) or if-conversion
|
||||
(@option{-ftree-loop-if-convert}) is disabled. The default is 2.
|
||||
|
||||
@item allow-load-data-races
|
||||
Allow optimizers to introduce new data races on loads.
|
||||
Set to 1 to allow, otherwise to 0. This option is enabled by default
|
||||
unless implicitly set by the @option{-fmemory-model=} option.
|
||||
|
||||
@item allow-store-data-races
|
||||
Allow optimizers to introduce new data races on stores.
|
||||
Set to 1 to allow, otherwise to 0. This option is enabled by default
|
||||
unless implicitly set by the @option{-fmemory-model=} option.
|
||||
|
||||
@item allow-packed-load-data-races
|
||||
Allow optimizers to introduce new data races on packed data loads.
|
||||
Set to 1 to allow, otherwise to 0. This option is enabled by default
|
||||
unless implicitly set by the @option{-fmemory-model=} option.
|
||||
|
||||
@item allow-packed-store-data-races
|
||||
Allow optimizers to introduce new data races on packed data stores.
|
||||
Set to 1 to allow, otherwise to 0. This option is enabled by default
|
||||
unless implicitly set by the @option{-fmemory-model=} option.
|
||||
at optimization level @option{-Ofast}.
|
||||
|
||||
@item case-values-threshold
|
||||
The smallest number of different values for which it is best to use a
|
||||
|
@ -620,6 +620,13 @@ default_options_optimization (struct gcc_options *opts,
|
||||
opt2 ? default_param_value (PARAM_LOOP_INVARIANT_MAX_BBS_IN_LOOP) : 1000,
|
||||
opts->x_param_values, opts_set->x_param_values);
|
||||
|
||||
/* At -Ofast, allow store motion to introduce potential race conditions. */
|
||||
maybe_set_param_value
|
||||
(PARAM_ALLOW_STORE_DATA_RACES,
|
||||
opts->x_optimize_fast ? 1
|
||||
: default_param_value (PARAM_ALLOW_STORE_DATA_RACES),
|
||||
opts->x_param_values, opts_set->x_param_values);
|
||||
|
||||
if (opts->x_optimize_size)
|
||||
/* We want to crossjump as much as possible. */
|
||||
maybe_set_param_value (PARAM_MIN_CROSSJUMP_INSNS, 1,
|
||||
|
@ -1002,25 +1002,10 @@ DEFPARAM (PARAM_CASE_VALUES_THRESHOLD,
|
||||
0, 0, 0)
|
||||
|
||||
/* Data race flags for C++0x memory model compliance. */
|
||||
DEFPARAM (PARAM_ALLOW_LOAD_DATA_RACES,
|
||||
"allow-load-data-races",
|
||||
"Allow new data races on loads to be introduced",
|
||||
1, 0, 1)
|
||||
|
||||
DEFPARAM (PARAM_ALLOW_STORE_DATA_RACES,
|
||||
"allow-store-data-races",
|
||||
"Allow new data races on stores to be introduced",
|
||||
1, 0, 1)
|
||||
|
||||
DEFPARAM (PARAM_ALLOW_PACKED_LOAD_DATA_RACES,
|
||||
"allow-packed-load-data-races",
|
||||
"Allow new data races on packed data loads to be introduced",
|
||||
1, 0, 1)
|
||||
|
||||
DEFPARAM (PARAM_ALLOW_PACKED_STORE_DATA_RACES,
|
||||
"allow-packed-store-data-races",
|
||||
"Allow new data races on packed data stores to be introduced",
|
||||
1, 0, 1)
|
||||
0, 0, 1)
|
||||
|
||||
/* Reassociation width to be used by tree reassoc optimization. */
|
||||
DEFPARAM (PARAM_TREE_REASSOC_WIDTH,
|
||||
|
@ -1,3 +1,14 @@
|
||||
2014-06-26 Martin Jambor <mjambor@suse.cz>
|
||||
|
||||
* g++.dg/simulate-thread/bitfields-2.C: Remove allow-load-data-races
|
||||
parameter.
|
||||
* g++.dg/simulate-thread/bitfields.C: Likewise.
|
||||
* gcc.dg/simulate-thread/strict-align-global.c: Remove
|
||||
allow-packed-store-data-races parameter.
|
||||
* gcc.dg/simulate-thread/subfields.c: Likewise.
|
||||
* gcc.dg/tree-ssa/20050314-1.c: Set parameter allow-store-data-races
|
||||
to one.
|
||||
|
||||
2014-06-26 Martin Jambor <mjambor@suse.cz>
|
||||
|
||||
* g++.dg/ipa/pr60600.C: Fix typo.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* { dg-do link } */
|
||||
/* { dg-options "--param allow-load-data-races=0 --param allow-store-data-races=0" } */
|
||||
/* { dg-options "--param allow-store-data-races=0" } */
|
||||
/* { dg-final { simulate-thread } } */
|
||||
|
||||
/* Test that setting <var.a> does not touch either <var.b> or <var.c>.
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* { dg-do link } */
|
||||
/* { dg-options "--param allow-load-data-races=0 --param allow-store-data-races=0" } */
|
||||
/* { dg-options "--param allow-store-data-races=0" } */
|
||||
/* { dg-final { simulate-thread } } */
|
||||
|
||||
/* Test that setting <var.a> does not touch either <var.b> or <var.c>.
|
||||
|
@ -1,5 +1,4 @@
|
||||
/* { dg-do link } */
|
||||
/* { dg-options "--param allow-packed-store-data-races=0" } */
|
||||
/* { dg-final { simulate-thread } } */
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -1,5 +1,4 @@
|
||||
/* { dg-do link } */
|
||||
/* { dg-options "--param allow-packed-store-data-races=0" } */
|
||||
/* { dg-final { simulate-thread } } */
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O1 -fdump-tree-lim1-details" } */
|
||||
/* { dg-options "-O1 -fdump-tree-lim1-details --param allow-store-data-races=1" } */
|
||||
|
||||
float a[100];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user