diff options
| author | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2018-08-09 22:04:30 +0000 |
|---|---|---|
| committer | Jonathan Peyton <jonathan.l.peyton@intel.com> | 2018-08-09 22:04:30 +0000 |
| commit | baad3f6016b87cbd03578a1df6c6ea69280c4608 (patch) | |
| tree | 3e56c3fb3ee58e87ca95e731d4ed4ec9eec793c0 /openmp/runtime/src/kmp_csupport.cpp | |
| parent | 7da7b56830d94447e75479cbac71e5813496da38 (diff) | |
| download | bcm5719-llvm-baad3f6016b87cbd03578a1df6c6ea69280c4608.tar.gz bcm5719-llvm-baad3f6016b87cbd03578a1df6c6ea69280c4608.zip | |
[OpenMP] Cleanup code
This patch cleans up unused functions, variables, sign compare issues, and
addresses some -Warning flags which are now enabled including -Wcast-qual.
Not all the warning flags in LibompHandleFlags.cmake are enabled, but some
are with this patch.
Some __kmp_gtid_from_* macros in kmp.h are switched to static inline functions
which allows us to remove the awkward definition of KMP_DEBUG_ASSERT() and
KMP_ASSERT() macros which used the comma operator. This had to be done for the
innumerable -Wunused-value warnings related to KMP_DEBUG_ASSERT()
Differential Revision: https://reviews.llvm.org/D49105
llvm-svn: 339393
Diffstat (limited to 'openmp/runtime/src/kmp_csupport.cpp')
| -rw-r--r-- | openmp/runtime/src/kmp_csupport.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/openmp/runtime/src/kmp_csupport.cpp b/openmp/runtime/src/kmp_csupport.cpp index b1d21164739..9729f39a726 100644 --- a/openmp/runtime/src/kmp_csupport.cpp +++ b/openmp/runtime/src/kmp_csupport.cpp @@ -1262,6 +1262,7 @@ static __forceinline kmp_dyna_lockseq_t __kmp_map_hint_to_lock(uintptr_t hint) { } #if OMPT_SUPPORT && OMPT_OPTIONAL +#if KMP_USE_DYNAMIC_LOCK static kmp_mutex_impl_t __ompt_get_mutex_impl_type(void *user_lock, kmp_indirect_lock_t *ilock = 0) { if (user_lock) { @@ -1306,7 +1307,7 @@ __ompt_get_mutex_impl_type(void *user_lock, kmp_indirect_lock_t *ilock = 0) { return ompt_mutex_impl_unknown; } } - +#else // For locks without dynamic binding static kmp_mutex_impl_t __ompt_get_mutex_impl_type() { switch (__kmp_user_lock_kind) { @@ -1329,7 +1330,8 @@ static kmp_mutex_impl_t __ompt_get_mutex_impl_type() { return ompt_mutex_impl_unknown; } } -#endif +#endif // KMP_USE_DYNAMIC_LOCK +#endif // OMPT_SUPPORT && OMPT_OPTIONAL /*! @ingroup WORK_SHARING |

