[PATCH] D53968: [LLD]fix windows mingw build with 'LLVM_LINK_LLVM_DYLIB' the lld will hang when exiting

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 5 01:44:51 PST 2018


mstorsjo added a comment.

In https://reviews.llvm.org/D53968#1286962, @ruiu wrote:

> > I guess so, plus the overhead of actually joining and waiting for all the threads to complete.
>
> Waiting for all the threads for completion may incur a noticeable delay when exiting in an error condition. Currently, when we exit from one thread running a parallel-for loop, I believe the entire process exit immediately, but if we wait for all thread to complete, I think we'll wait for the parallel-for loop to complete. That situation could happen if we are processing relocations, for example, and found a lot of relocation errors.


Ok, I see.

I think this one might be correct in general though (for any other tool that uses the LLVM internals built into a separate DLL), but for LLD for wanting to exit quickly, should there be a way to tell the ThreadPoolExecutor object to skip any cleanup in the destructor?


Repository:
  rL LLVM

https://reviews.llvm.org/D53968





More information about the llvm-commits mailing list