aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2016-11-28 21:53:38 +0000
committerTom Stellard <thomas.stellard@amd.com>2016-11-28 21:53:38 +0000
commitdfdf54f264e683865e0eb3b378f7919fb07f8d92 (patch)
tree196c1e0c68444739cb71da9adca871387435efaf
parent5e21eeb9c55c14e8f0077a3445afb56baca47ad0 (diff)
downloadllvm-dfdf54f264e683865e0eb3b378f7919fb07f8d92.zip
llvm-dfdf54f264e683865e0eb3b378f7919fb07f8d92.tar.gz
llvm-dfdf54f264e683865e0eb3b378f7919fb07f8d92.tar.bz2
Merging r285782:
------------------------------------------------------------------------ r285782 | brad | 2016-11-01 18:39:01 -0700 (Tue, 01 Nov 2016) | 9 lines Disable the use of std::call_once on OpenBSD with libstdc++. It was noticed this caused performance regressions and deadlocks. PR30768. Reorder the code to make it clearer what is tested. PPC now disables the use of std::call_once only with libstdc++ with the reordering of the code, as was the original intent. ------------------------------------------------------------------------ llvm-svn: 288075
-rw-r--r--llvm/include/llvm/Support/Threading.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/include/llvm/Support/Threading.h b/llvm/include/llvm/Support/Threading.h
index 09b96df..fe407b7 100644
--- a/llvm/include/llvm/Support/Threading.h
+++ b/llvm/include/llvm/Support/Threading.h
@@ -20,11 +20,11 @@
#include <ciso646> // So we can check the C++ standard lib macros.
#include <functional>
-// We use std::call_once on all Unix platforms except for NetBSD with
-// libstdc++. That platform has a bug they are working to fix, and they'll
-// remove the NetBSD checks once fixed.
-#if defined(LLVM_ON_UNIX) && \
- !(defined(__NetBSD__) && !defined(_LIBCPP_VERSION)) && !defined(__ppc__)
+// std::call_once from libc++ is used on all Unix platforms. Other
+// implementations like libstdc++ are known to have problems on NetBSD,
+// OpenBSD and PowerPC.
+#if defined(LLVM_ON_UNIX) && (defined(_LIBCPP_VERSION) || \
+ !(defined(__NetBSD__) || defined(__OpenBSD__) || defined(__ppc__)))
#define LLVM_THREADING_USE_STD_CALL_ONCE 1
#else
#define LLVM_THREADING_USE_STD_CALL_ONCE 0