diff options
author | Zachary Turner <zturner@google.com> | 2014-06-10 23:01:20 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2014-06-10 23:01:20 +0000 |
commit | 529e9d307e6d1cd89ba278864b9a0f356d98e574 (patch) | |
tree | d885111e170ab727deff893d8812438d2340c555 /lib/IR | |
parent | 159e4085639ae5f58eaa4046189ec2b2a41bd9bb (diff) | |
download | llvm-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 'lib/IR')
-rw-r--r-- | lib/IR/Core.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/IR/Core.cpp b/lib/IR/Core.cpp index f24704c61c..2bdc92da8f 100644 --- a/lib/IR/Core.cpp +++ b/lib/IR/Core.cpp @@ -2702,11 +2702,10 @@ void LLVMDisposePassManager(LLVMPassManagerRef PM) { /*===-- Threading ------------------------------------------------------===*/ LLVMBool LLVMStartMultithreaded() { - return llvm_start_multithreaded(); + return LLVMIsMultithreaded(); } void LLVMStopMultithreaded() { - llvm_stop_multithreaded(); } LLVMBool LLVMIsMultithreaded() { |