[llvm-dev] LLVM multithreading support

Zachary Turner via llvm-dev llvm-dev at lists.llvm.org
Mon Apr 13 23:28:44 PDT 2020

On Sat, Apr 11, 2020 at 5:15 PM Chris Lattner <clattner at nondot.org> wrote:

> Historically, LLVM had a design where you could dynamically enable and
> disable multithreading support in a tool, which would be perfect for this
> use case, but it got removed by this patch
> <https://github.com/llvm/llvm-project/commit/9c9710eaf4c1f01b8b518bdba89aba059ab14175#diff-bb772a7e6d4ebf2b46c6d42c95f40ddf>:
> (xref https://reviews.llvm.org/D4216).  The rationale in the patch
> doesn’t make sense to me - this mode had nothing to do with the old LLVM
> global lock, this had to do with whether llvm::llvm_is_multithreaded()
> returned true or false … which all the locking stuff is guarded on.
> Would it make sense to re-enable this, or am I missing something?
> -Chris

It’s been a while, but also see
https://reviews.llvm.org/D4142 for more context.

This was probably one of my first patches ever to LLVM, but it sounds like
the thought process was something like:

1) Stop using llvm_start_multithreaded in two places where it wasn’t needed.

2) Realize that it’s never called anymore *anywhere*

3) Delete dead code.

Given that it’s been 6 years with nobody else needing this, I’m skeptical
that its of broad enough utility to re-introduce.  On the other hand, I’m
basically inactive at this point so I have no horse in the race.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200413/ae4ec76e/attachment.html>

More information about the llvm-dev mailing list