[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
Tue Jan 31 11:30:59 PST 2023
tianshilei1992 created this revision.
tianshilei1992 added reviewers: jdoerfert, tlwilmar, jlpeyton, AndreyChurbanov.
Herald added subscribers: guansong, yaxunl.
Herald added a project: All.
tianshilei1992 requested review of this revision.
Herald added subscribers: openmp-commits, sstefan1.
Herald added a project: OpenMP.
`check_loc` is not used if ITT is disabled or debug is off, causing a
compiler warning.
Repository:
rG LLVM Github Monorepo
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.493693.patch
Type: text/x-patch
Size: 625 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230131/b8297924/attachment.bin>
More information about the Openmp-commits
mailing list