Remove support for runtime multi-threading.
authorZachary Turner <zturner@google.com>
Tue, 10 Jun 2014 23:01:20 +0000 (23:01 +0000)
committerZachary Turner <zturner@google.com>
Tue, 10 Jun 2014 23:01:20 +0000 (23:01 +0000)
commit529e9d307e6d1cd89ba278864b9a0f356d98e574
treed885111e170ab727deff893d8812438d2340c555
parent159e4085639ae5f58eaa4046189ec2b2a41bd9bb
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
include/llvm-c/Core.h
include/llvm/Support/ManagedStatic.h
include/llvm/Support/Threading.h
lib/IR/Core.cpp
lib/Support/ErrorHandling.cpp
lib/Support/ManagedStatic.cpp
lib/Support/Threading.cpp
lib/Support/Timer.cpp