[PATCH] D18999: [ELF/LTO] Parallel Codegen for LLD

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 15 12:40:07 PDT 2016


ruiu added inline comments.

================
Comment at: ELF/Config.h:97
@@ -96,2 +96,3 @@
   uint64_t EntryAddr = -1;
+  unsigned CGThreads;
   unsigned LtoO;
----------------
Since this is for --lto-jobs, I'd name LtoJobs.

================
Comment at: ELF/LTO.cpp:144
@@ +143,3 @@
+std::vector<std::unique_ptr<InputFile>> BitcodeCompiler::runSplitCodegen() {
+  unsigned NumThreads = Config->CGThreads;
+  OwningData.resize(NumThreads);
----------------
Instead of defining NumThreads, use Config->LtoJobs directly.

================
Comment at: ELF/LTO.cpp:155
@@ +154,3 @@
+  splitCodeGen(std::move(Combined), OSPtrs, {},
+               std::bind(&BitcodeCompiler::getTargetMachine, this));
+
----------------
Does

  [&]() { return getTargetMachine; }

work?


http://reviews.llvm.org/D18999





More information about the llvm-commits mailing list