aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadupdate.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2021-09-03 09:54:58 +0200
committerJakub Jelinek <jakub@redhat.com>2021-09-03 09:54:58 +0200
commit090f0d78f194e3cda23fe904016db77ea36c38fa (patch)
tree87259b34ec46b2c39b0ff629fc54106acc9d8404 /gcc/tree-ssa-threadupdate.c
parente902136b310ee17d4b49eb42d9d5e487d5dcf4a1 (diff)
downloadgcc-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-threadupdate.c')
0 files changed, 0 insertions, 0 deletions