[PATCH] D131247: [ELF] Parallelize writes of different OutputSections

Andrew Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 22 10:23:51 PDT 2022


andrewng added a comment.

I've tested this latest patch applied to our downstream port on Windows and it improves linking performance in all our test cases that I've managed to test so far.



================
Comment at: llvm/include/llvm/Support/Parallel.h:82
+  //   if (done || taskSize >= taskSizeLimit) {
+  //     tg.maybeSpawn([=] { fn(begin, i); });
+  //     if (done)
----------------
`maybeSpawn` -> `execute`.


================
Comment at: llvm/lib/Support/Parallel.cpp:22
 
 #if LLVM_ENABLE_THREADS
 
----------------
The patch doesn't compile with `LLVM_ENABLE_THREADS=OFF`. I think this guard needs to move down.


================
Comment at: llvm/lib/Support/Parallel.cpp:182
 } // namespace llvm
 #endif // LLVM_ENABLE_THREADS
 
----------------
This guard needs to move up and I think `TaskGroup::spawn` above will need guards added too.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131247



More information about the llvm-commits mailing list