[Openmp-commits] [PATCH] D21893: Improve performance of #pragma omp single
Jonathan Peyton via Openmp-commits
openmp-commits at lists.llvm.org
Fri Jul 1 10:44:58 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL274369: Improve performance of #pragma omp single (authored by jlpeyton).
Changed prior to commit:
http://reviews.llvm.org/D21893?vs=62360&id=62510#toc
Repository:
rL LLVM
http://reviews.llvm.org/D21893
Files:
openmp/trunk/runtime/src/kmp_runtime.c
Index: openmp/trunk/runtime/src/kmp_runtime.c
===================================================================
--- openmp/trunk/runtime/src/kmp_runtime.c
+++ openmp/trunk/runtime/src/kmp_runtime.c
@@ -777,8 +777,10 @@
single block
*/
/* TODO: Should this be acquire or release? */
- status = KMP_COMPARE_AND_STORE_ACQ32(&team->t.t_construct, old_this,
- th->th.th_local.this_construct);
+ if (team->t.t_construct == old_this) {
+ status = KMP_COMPARE_AND_STORE_ACQ32(&team->t.t_construct, old_this,
+ th->th.th_local.this_construct);
+ }
#if USE_ITT_BUILD
if ( __itt_metadata_add_ptr && __kmp_forkjoin_frames_mode == 3 && KMP_MASTER_GTID(gtid) &&
#if OMP_40_ENABLED
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21893.62510.patch
Type: text/x-patch
Size: 834 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20160701/24523a0e/attachment.bin>
More information about the Openmp-commits
mailing list