[PATCH] D115416: [lld-macho] Prevent writing map files on the critical path

Vincent Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 13 11:15:33 PST 2021


thevinster planned changes to this revision.
thevinster added inline comments.


================
Comment at: lld/MachO/Writer.cpp:68
 
+  ThreadPool writerThreadPool;
   std::unique_ptr<FileOutputBuffer> &buffer;
----------------
int3 wrote:
> thevinster wrote:
> > int3 wrote:
> > > super nit, but "writer" here seems redundant since this is the only threadpool used in Writer
> > I think it might be more relevant now we that want to use it in `finalizeLinkEditSegment`. Any reason why we want to instantiate it in the `run` scope as opposed to having it as a member of the class? It's possible we may want to use it elsewhere within the `Writer` class? In fact, scanning usages of `parallelForEach{N}` also shows `writeUuid` benefiting from using async as well. In that case, it makes sense to put it at the class level scope. 
> I have no issues with the scope. I'm just saying that having "writer" in the variable name seems redundant
My bad. I misinterpreted the statement. 👍


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115416/new/

https://reviews.llvm.org/D115416



More information about the llvm-commits mailing list