[Openmp-commits] [PATCH] D143004: [OpenMP] Guard the code if ITT is not used

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Feb 2 19:54:47 PST 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG2d6adb366e8b: [OpenMP] Guard the code if ITT is not used (authored by tianshilei1992).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143004/new/

https://reviews.llvm.org/D143004

Files:
  openmp/runtime/src/kmp_sched.cpp


Index: openmp/runtime/src/kmp_sched.cpp
===================================================================
--- openmp/runtime/src/kmp_sched.cpp
+++ openmp/runtime/src/kmp_sched.cpp
@@ -61,11 +61,13 @@
 #define KMP_STATS_LOOP_END(stat) /* Nothing */
 #endif
 
+#if USE_ITT_BUILD || defined KMP_DEBUG
 static ident_t loc_stub = {0, KMP_IDENT_KMPC, 0, 0, ";unknown;unknown;0;0;;"};
 static inline void check_loc(ident_t *&loc) {
   if (loc == NULL)
     loc = &loc_stub; // may need to report location info to ittnotify
 }
+#endif
 
 template <typename T>
 static void __kmp_for_static_init(ident_t *loc, kmp_int32 global_tid,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143004.494497.patch
Type: text/x-patch
Size: 625 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230203/146ac295/attachment.bin>


More information about the Openmp-commits mailing list