[PATCH] Remove support for enabling / disabling multi-threading at runtime.
Alp Toker
alp at nuanti.com
Mon Jun 9 16:16:24 PDT 2014
On 10/06/2014 02:07, Reid Kleckner wrote:
> Nice! I want to get a little more support for this direction before committing. Let me try to rope in some appropriate people. In the meantime, I had some comments.
>
> ================
> Comment at: include/llvm-c/Core.h:2856
> @@ -2855,3 @@
> - @see llvm::llvm_start_multithreaded */
> -LLVMBool LLVMStartMultithreaded(void);
> -
> ----------------
> The C API is one of the few places where we have hard ABI stability guarantees. These should become no-op stubs.
Yes, but do go ahead and document it as deprecated.
>
> ================
> Comment at: include/llvm/Support/Threading.h:38
> @@ +37,3 @@
> + /// llvm_get_global_lock() - returns the llvm global lock object.
> + llvm::recursive_mutex& llvm_get_global_lock();
> +
> ----------------
> nit: LLVM is in the 'star-on-the-right' camp.
>
> ================
> Comment at: lib/Support/Threading.cpp:28-32
> @@ -27,13 +27,7 @@
> +bool llvm::llvm_is_multithreaded() {
> #if LLVM_ENABLE_THREADS != 0
> - assert(!multithreaded_mode && "Already multithreaded!");
> - multithreaded_mode = true;
> - global_lock = new sys::Mutex(true);
> -
> - // We fence here to ensure that all initialization is complete BEFORE we
> - // return from llvm_start_multithreaded().
> - sys::MemoryFence();
> return true;
> #else
> return false;
> #endif
> }
> ----------------
> return bool(LLVM_ENABLE_THREADS) ?
Zach's #if is actually the preferred form and will make it easier to
factor these feature defines into consistency. Please don't rely on a
conversion from the expansion.
Alp.
>
> http://reviews.llvm.org/D4076
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
--
http://www.nuanti.com
the browser experts
More information about the llvm-commits
mailing list