<div><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Apr 11, 2020 at 5:15 PM Chris Lattner <<a href="mailto:clattner@nondot.org">clattner@nondot.org</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div><br></div><div>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 <a href="https://github.com/llvm/llvm-project/commit/9c9710eaf4c1f01b8b518bdba89aba059ab14175#diff-bb772a7e6d4ebf2b46c6d42c95f40ddf" target="_blank">this patch</a>: (xref <a href="https://reviews.llvm.org/D4216" target="_blank">https://reviews.llvm.org/D4216</a>).  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.</div><div><br></div><div>Would it make sense to re-enable this, or am I missing something?</div></div><div style="word-wrap:break-word;line-break:after-white-space"><div><br></div><div>-Chris</div></div></blockquote><div dir="auto"><br></div><div dir="auto">It’s been a while, but also see <div><a href="https://reviews.llvm.org/D4142">https://reviews.llvm.org/D4142</a> for more context.</div><div dir="auto"><br></div><div dir="auto">This was probably one of my first patches ever to LLVM, but it sounds like the thought process was something like:</div><div dir="auto"><br></div><div dir="auto">1) Stop using llvm_start_multithreaded in two places where it wasn’t needed.</div><div dir="auto"><br></div><div dir="auto">2) Realize that it’s never called anymore *anywhere*</div><div dir="auto"><br></div><div dir="auto">3) Delete dead code.</div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto"><br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div></div></div></blockquote></div></div>