summaryrefslogtreecommitdiff
path: root/include/llvm-c
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2014-06-10 23:01:20 +0000
committerZachary Turner <zturner@google.com>2014-06-10 23:01:20 +0000
commit529e9d307e6d1cd89ba278864b9a0f356d98e574 (patch)
treed885111e170ab727deff893d8812438d2340c555 /include/llvm-c
parent159e4085639ae5f58eaa4046189ec2b2a41bd9bb (diff)
downloadllvm-529e9d307e6d1cd89ba278864b9a0f356d98e574.tar.gz
llvm-529e9d307e6d1cd89ba278864b9a0f356d98e574.tar.bz2
llvm-529e9d307e6d1cd89ba278864b9a0f356d98e574.tar.xz
Remove support for runtime multi-threading.
This patch removes the functions llvm_start_multithreaded() and llvm_stop_multithreaded(), and changes llvm_is_multithreaded() to return a constant value based on the value of the compile-time definition LLVM_ENABLE_THREADS. Previously, it was possible to have compile-time support for threads on, and runtime support for threads off, in which case certain mutexes were not allocated or ever acquired. Now, if the build is created with threads enabled, mutexes are always acquired. A test before/after patch of compiling a very large TU showed no noticeable performance impact of this change. Reviewers: rnk Differential Revision: http://reviews.llvm.org/D4076 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210600 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm-c')
-rw-r--r--include/llvm-c/Core.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/include/llvm-c/Core.h b/include/llvm-c/Core.h
index 0e78ed71fa..8693a3020a 100644
--- a/include/llvm-c/Core.h
+++ b/include/llvm-c/Core.h
@@ -2848,16 +2848,13 @@ void LLVMDisposePassManager(LLVMPassManagerRef PM);
* @{
*/
-/** Allocate and initialize structures needed to make LLVM safe for
- multithreading. The return value indicates whether multithreaded
- initialization succeeded. Must be executed in isolation from all
- other LLVM api calls.
- @see llvm::llvm_start_multithreaded */
+/** Deprecated: Multi-threading can only be enabled/disabled with the compile
+ time define LLVM_ENABLE_THREADS. This function always returns
+ LLVMIsMultithreaded(). */
LLVMBool LLVMStartMultithreaded(void);
-/** Deallocate structures necessary to make LLVM safe for multithreading.
- Must be executed in isolation from all other LLVM api calls.
- @see llvm::llvm_stop_multithreaded */
+/** Deprecated: Multi-threading can only be enabled/disabled with the compile
+ time define LLVM_ENABLE_THREADS. */
void LLVMStopMultithreaded(void);
/** Check whether LLVM is executing in thread-safe mode or not.