[Openmp-commits] [PATCH] D112261: [OpenMP] libomp: disable definitions of 5.1 atomics for non-x86 arch
Andrey Churbanov via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Oct 21 12:20:18 PDT 2021
AndreyChurbanov created this revision.
AndreyChurbanov added reviewers: hbae, jlpeyton, Nawrin, tlwilmar.
AndreyChurbanov added a project: OpenMP.
Herald added subscribers: pengfei, guansong, yaxunl.
AndreyChurbanov requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: openmp-commits, sstefan1.
Declarations of 5.1 atomic entries were added under `#if KMP_ARCH_X86 || KMP_ARCH_X86_64` in kmp_atomic.h, but definitions of the functions missed architecture guard in kmp_atomic.cpp.
As a result mangled symbols were available on non-x86 architecture. The patch eliminates these unexpected symbols from the library.
Also tests added in https://reviews.llvm.org/D110109 fixed to be skipped on non supported architectures in a separate NFC commit https://reviews.llvm.org/rG52f4922ebb7b.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D112261
Files:
openmp/runtime/src/kmp_atomic.cpp
Index: openmp/runtime/src/kmp_atomic.cpp
===================================================================
--- openmp/runtime/src/kmp_atomic.cpp
+++ openmp/runtime/src/kmp_atomic.cpp
@@ -3694,6 +3694,8 @@
__kmp_release_atomic_lock(&__kmp_atomic_lock, gtid);
}
+#if KMP_ARCH_X86 || KMP_ARCH_X86_64
+
// OpenMP 5.1 compare and swap
/*!
@@ -3855,6 +3857,7 @@
}
// End OpenMP 5.1 compare + capture
+#endif // KMP_ARCH_X86 || KMP_ARCH_X86_64
/*!
@}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112261.381355.patch
Type: text/x-patch
Size: 464 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20211021/e5eb8d3e/attachment.bin>
More information about the Openmp-commits
mailing list