[PATCH] D15390: [ThinLTO] Launch importing backends in parallel threads from gold plugin

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 9 13:31:58 PST 2015


joker.eph added inline comments.

================
Comment at: lib/Transforms/IPO/FunctionImport.cpp:272
@@ -271,3 +271,3 @@
 
-  explicit FunctionImportPass(FunctionInfoIndex *Index = nullptr)
+  explicit FunctionImportPass(const FunctionInfoIndex *Index = nullptr)
       : ModulePass(ID), Index(Index) {}
----------------
Const correctness is great, please commit now separately.

================
Comment at: tools/gold/gold-plugin.cpp:940
@@ +939,3 @@
+
+/// Launch each module's backend pipeline in a separate thread.
+static void ThinLTOBackends(raw_fd_ostream *ApiFile,
----------------
We should probably refactor this out of the plugin, but this can be done later.

================
Comment at: tools/gold/gold-plugin.cpp:979
@@ +978,3 @@
+  }
+}
+
----------------
This is very suboptimal, I don't mind if you want to get this in for now as it is limited to the gold plugin.

I plan to submit a ThreadPool to LLVMSupport (I'm using it locally in my bringup of the ld64 plugin).


http://reviews.llvm.org/D15390





More information about the llvm-commits mailing list