diff options
author | qing zhao <qinzhao@gcc.gnu.org> | 2020-10-08 17:01:07 +0200 |
---|---|---|
committer | qing zhao <qinzhao@gcc.gnu.org> | 2020-10-08 17:01:07 +0200 |
commit | baf4750feaa6a5fa502ae7bc0b90f31640af6f47 (patch) | |
tree | f1b15e09af1700d5cc8c8aa2289684aef05be434 | |
parent | b2a96bf9dce41ee777b1669e4a8b4c6df3ff3613 (diff) | |
download | gcc-baf4750feaa6a5fa502ae7bc0b90f31640af6f47.zip gcc-baf4750feaa6a5fa502ae7bc0b90f31640af6f47.tar.gz gcc-baf4750feaa6a5fa502ae7bc0b90f31640af6f47.tar.bz2 |
Improve documentation of -fallow-store-data-races
2020-10-08 John Henning <john.henning@oracle.com>
gcc/
PR other/97309
* doc/invoke.texi: Improve documentation of
-fallow-store-data-races.
-rw-r--r-- | gcc/doc/invoke.texi | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index c177496..b8c807e 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -11622,7 +11622,18 @@ Do not remove unused C++ allocations in dead code elimination. @item -fallow-store-data-races @opindex fallow-store-data-races -Allow the compiler to introduce new data races on stores. +Allow the compiler to perform optimizations that may introduce new data races +on stores, without proving that the variable cannot be concurrently accessed +by other threads. Does not affect optimization of local data. It is safe to +use this option if it is known that global data will not be accessed by +multiple threads. + +Examples of optimizations enabled by @option{-fallow-store-data-races} include +hoisting or if-conversions that may cause a value that was already in memory +to be re-written with that same value. Such re-writing is safe in a single +threaded context but may be unsafe in a multi-threaded context. Note that on +some processors, if-conversions may be required in order to enable +vectorization. Enabled at level @option{-Ofast}. |