[Openmp-commits] [PATCH] D83171: [OpenMP][OMPT] Fix ifdefs for OMPT code

Joachim Protze via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sat Jul 4 23:57:27 PDT 2020


protze.joachim created this revision.
protze.joachim added a reviewer: hbae.
protze.joachim added a project: OpenMP.
Herald added subscribers: sstefan1, guansong, yaxunl.
Herald added a reviewer: jdoerfert.

Build with LIBOMP_OMPT_SUPPORT=off fails currently

Reported by: Jason Edson


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83171

Files:
  openmp/runtime/src/kmp_taskdeps.cpp


Index: openmp/runtime/src/kmp_taskdeps.cpp
===================================================================
--- openmp/runtime/src/kmp_taskdeps.cpp
+++ openmp/runtime/src/kmp_taskdeps.cpp
@@ -638,9 +638,9 @@
   return ret;
 }
 
+#if OMPT_SUPPORT
 void __ompt_taskwait_dep_finish(kmp_taskdata_t *current_task,
                                 ompt_data_t *taskwait_task_data) {
-#if OMPT_SUPPORT
   if (ompt_enabled.ompt_callback_task_schedule) {
     ompt_data_t task_data = ompt_data_none;
     ompt_callbacks.ompt_callback(ompt_callback_task_schedule)(
@@ -652,8 +652,8 @@
   }
   current_task->ompt_task_info.frame.enter_frame.ptr = NULL;
   *taskwait_task_data = ompt_data_none;
-#endif /* OMPT_SUPPORT */
 }
+#endif /* OMPT_SUPPORT */
 
 /*!
 @ingroup TASKING
@@ -763,7 +763,9 @@
     KA_TRACE(10, ("__kmpc_omp_wait_deps(exit): T#%d has no blocking "
                   "dependencies : loc=%p\n",
                   gtid, loc_ref));
+#if OMPT_SUPPORT
     __ompt_taskwait_dep_finish(current_task, taskwait_task_data);
+#endif /* OMPT_SUPPORT */
     return;
   }
 
@@ -776,7 +778,9 @@
     KA_TRACE(10, ("__kmpc_omp_wait_deps(exit): T#%d has no blocking "
                   "dependencies : loc=%p\n",
                   gtid, loc_ref));
+#if OMPT_SUPPORT
     __ompt_taskwait_dep_finish(current_task, taskwait_task_data);
+#endif /* OMPT_SUPPORT */
     return;
   }
 
@@ -788,7 +792,9 @@
                        __kmp_task_stealing_constraint);
   }
 
+#if OMPT_SUPPORT
   __ompt_taskwait_dep_finish(current_task, taskwait_task_data);
+#endif /* OMPT_SUPPORT */
   KA_TRACE(10, ("__kmpc_omp_wait_deps(exit): T#%d finished waiting : loc=%p\n",
                 gtid, loc_ref));
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83171.275540.patch
Type: text/x-patch
Size: 1690 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20200705/3b7d361d/attachment.bin>


More information about the Openmp-commits mailing list