diff options
author | Jakub Jelinek <jakub@redhat.com> | 2021-09-03 09:54:58 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2021-09-03 09:54:58 +0200 |
commit | 090f0d78f194e3cda23fe904016db77ea36c38fa (patch) | |
tree | 87259b34ec46b2c39b0ff629fc54106acc9d8404 /gcc/tree-ssa-threadedge.c | |
parent | e902136b310ee17d4b49eb42d9d5e487d5dcf4a1 (diff) | |
download | gcc-090f0d78f194e3cda23fe904016db77ea36c38fa.zip gcc-090f0d78f194e3cda23fe904016db77ea36c38fa.tar.gz gcc-090f0d78f194e3cda23fe904016db77ea36c38fa.tar.bz2 |
openmp: Improve expand_omp_atomic_pipeline
When __atomic_* builtins were introduced, omp-expand.c (omp-low.c
at that point) has been adjusted in several spots so that it uses
the atomic builtins instead of sync builtins, but
expand_omp_atomic_pipeline has not because the __atomic_compare_exchange_*
APIs take address of the argument, so it kept using __sync_val_compare_swap_*.
That means it always uses seq_cst though.
This patch changes it to use the ATOMIC_COMPARE_EXCHANGE ifn which gimple-fold
folds __atomic_compare_exchange_* into - that ifn also passes expected
directly.
2021-09-03 Jakub Jelinek <jakub@redhat.com>
* omp-expand.c (expand_omp_atomic_pipeline): Use
IFN_ATOMIC_COMPARE_EXCHANGE instead of
BUILT_IN_SYNC_VAL_COMPARE_AND_SWAP_? so that memory order
can be provided.
Diffstat (limited to 'gcc/tree-ssa-threadedge.c')
0 files changed, 0 insertions, 0 deletions