Skip to content

Commit eab1fd3

Browse files
author
Vladislav Vinogradov
committed
[omp] Fix build without ITT after D103121 changes
Reviewed By: AndreyChurbanov Differential Revision: https://reviews.llvm.org/D104638
1 parent 83bf801 commit eab1fd3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

openmp/runtime/src/kmp_barrier.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,9 @@ void __kmp_dist_barrier_wakeup(enum barrier_type bt, kmp_team_t *team,
225225
}
226226
}
227227

228-
static void
229-
__kmp_dist_barrier_gather(enum barrier_type bt, kmp_info_t *this_thr, int gtid,
230-
int tid, void (*reduce)(void *, void *)
231-
USE_ITT_BUILD_ARG(void *itt_sync_obj)) {
228+
static void __kmp_dist_barrier_gather(
229+
enum barrier_type bt, kmp_info_t *this_thr, int gtid, int tid,
230+
void (*reduce)(void *, void *) USE_ITT_BUILD_ARG(void *itt_sync_obj)) {
232231
KMP_TIME_DEVELOPER_PARTITIONED_BLOCK(KMP_dist_gather);
233232
kmp_team_t *team;
234233
distributedBarrier *b;
@@ -404,7 +403,7 @@ static void __kmp_dist_barrier_release(
404403
if (KMP_COMPARE_AND_STORE_ACQ32(&(this_thr->th.th_used_in_team), 2,
405404
0) ||
406405
this_thr->th.th_used_in_team.load() == 0) {
407-
my_flag.wait(this_thr, true, itt_sync_obj);
406+
my_flag.wait(this_thr, true USE_ITT_BUILD_ARG(itt_sync_obj));
408407
}
409408
#if USE_ITT_BUILD && USE_ITT_NOTIFY
410409
if ((__itt_sync_create_ptr && itt_sync_obj == NULL) || KMP_ITT_DEBUG) {
@@ -454,7 +453,7 @@ static void __kmp_dist_barrier_release(
454453
// Wait on go flag on team
455454
kmp_atomic_flag_64<false, true> my_flag(
456455
&(b->go[my_go_index].go), next_go, &(b->sleep[tid].sleep));
457-
my_flag.wait(this_thr, true, itt_sync_obj);
456+
my_flag.wait(this_thr, true USE_ITT_BUILD_ARG(itt_sync_obj));
458457
KMP_DEBUG_ASSERT(my_current_iter == b->iter[tid].iter ||
459458
b->iter[tid].iter == 0);
460459
KMP_DEBUG_ASSERT(b->sleep[tid].sleep == false);

openmp/runtime/src/kmp_wait_release.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,8 @@ class kmp_flag_oncore : public kmp_flag_native<kmp_uint64, flag_oncore, false> {
943943
}
944944
kmp_flag_oncore(volatile kmp_uint64 *p, kmp_uint32 idx)
945945
: kmp_flag_native<kmp_uint64, flag_oncore, false>(p), offset(idx),
946-
flag_switch(false), bt(bs_last_barrier), itt_sync_obj(nullptr) {}
946+
flag_switch(false),
947+
bt(bs_last_barrier) USE_ITT_BUILD_ARG(itt_sync_obj(nullptr)) {}
947948
kmp_flag_oncore(volatile kmp_uint64 *p, kmp_uint64 c, kmp_uint32 idx,
948949
enum barrier_type bar_t,
949950
kmp_info_t *thr USE_ITT_BUILD_ARG(void *itt))

0 commit comments

Comments
 (0)