[Openmp-commits] [openmp] eab1fd3 - [omp] Fix build without ITT after D103121 changes

Vladislav Vinogradov via Openmp-commits openmp-commits at lists.llvm.org
Mon Jun 21 08:17:10 PDT 2021


Author: Vladislav Vinogradov
Date: 2021-06-21T18:17:52+03:00
New Revision: eab1fd389b61d236bf8df4d09f62dd18253a10bc

URL: https://github.com/llvm/llvm-project/commit/eab1fd389b61d236bf8df4d09f62dd18253a10bc
DIFF: https://github.com/llvm/llvm-project/commit/eab1fd389b61d236bf8df4d09f62dd18253a10bc.diff

LOG: [omp] Fix build without ITT after D103121 changes

Reviewed By: AndreyChurbanov

Differential Revision: https://reviews.llvm.org/D104638

Added: 
    

Modified: 
    openmp/runtime/src/kmp_barrier.cpp
    openmp/runtime/src/kmp_wait_release.h

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/src/kmp_barrier.cpp b/openmp/runtime/src/kmp_barrier.cpp
index 134163e23fa7f..a0a020bf9474e 100644
--- a/openmp/runtime/src/kmp_barrier.cpp
+++ b/openmp/runtime/src/kmp_barrier.cpp
@@ -225,10 +225,9 @@ void __kmp_dist_barrier_wakeup(enum barrier_type bt, kmp_team_t *team,
   }
 }
 
-static void
-__kmp_dist_barrier_gather(enum barrier_type bt, kmp_info_t *this_thr, int gtid,
-                          int tid, void (*reduce)(void *, void *)
-                                       USE_ITT_BUILD_ARG(void *itt_sync_obj)) {
+static void __kmp_dist_barrier_gather(
+    enum barrier_type bt, kmp_info_t *this_thr, int gtid, int tid,
+    void (*reduce)(void *, void *) USE_ITT_BUILD_ARG(void *itt_sync_obj)) {
   KMP_TIME_DEVELOPER_PARTITIONED_BLOCK(KMP_dist_gather);
   kmp_team_t *team;
   distributedBarrier *b;
@@ -404,7 +403,7 @@ static void __kmp_dist_barrier_release(
         if (KMP_COMPARE_AND_STORE_ACQ32(&(this_thr->th.th_used_in_team), 2,
                                         0) ||
             this_thr->th.th_used_in_team.load() == 0) {
-          my_flag.wait(this_thr, true, itt_sync_obj);
+          my_flag.wait(this_thr, true USE_ITT_BUILD_ARG(itt_sync_obj));
         }
 #if USE_ITT_BUILD && USE_ITT_NOTIFY
         if ((__itt_sync_create_ptr && itt_sync_obj == NULL) || KMP_ITT_DEBUG) {
@@ -454,7 +453,7 @@ static void __kmp_dist_barrier_release(
         // Wait on go flag on team
         kmp_atomic_flag_64<false, true> my_flag(
             &(b->go[my_go_index].go), next_go, &(b->sleep[tid].sleep));
-        my_flag.wait(this_thr, true, itt_sync_obj);
+        my_flag.wait(this_thr, true USE_ITT_BUILD_ARG(itt_sync_obj));
         KMP_DEBUG_ASSERT(my_current_iter == b->iter[tid].iter ||
                          b->iter[tid].iter == 0);
         KMP_DEBUG_ASSERT(b->sleep[tid].sleep == false);

diff  --git a/openmp/runtime/src/kmp_wait_release.h b/openmp/runtime/src/kmp_wait_release.h
index 5c250d94886f6..e63a93ce880f1 100644
--- a/openmp/runtime/src/kmp_wait_release.h
+++ b/openmp/runtime/src/kmp_wait_release.h
@@ -943,7 +943,8 @@ class kmp_flag_oncore : public kmp_flag_native<kmp_uint64, flag_oncore, false> {
   }
   kmp_flag_oncore(volatile kmp_uint64 *p, kmp_uint32 idx)
       : kmp_flag_native<kmp_uint64, flag_oncore, false>(p), offset(idx),
-        flag_switch(false), bt(bs_last_barrier), itt_sync_obj(nullptr) {}
+        flag_switch(false),
+        bt(bs_last_barrier) USE_ITT_BUILD_ARG(itt_sync_obj(nullptr)) {}
   kmp_flag_oncore(volatile kmp_uint64 *p, kmp_uint64 c, kmp_uint32 idx,
                   enum barrier_type bar_t,
                   kmp_info_t *thr USE_ITT_BUILD_ARG(void *itt))


        


More information about the Openmp-commits mailing list