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

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 9 13:37:35 PST 2015


tejohnson added a comment.

Thanks for the 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) {}
----------------
joker.eph wrote:
> Const correctness is great, please commit now separately.
Done already, just rebased this to pick it up.

================
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,
----------------
joker.eph wrote:
> We should probably refactor this out of the plugin, but this can be done later.
Right, I am wondering how much overlap there is with the support you were adding for ld64. Would putting it in libLTO be useful?

================
Comment at: tools/gold/gold-plugin.cpp:979
@@ +978,3 @@
+  }
+}
+
----------------
joker.eph wrote:
> 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).
Right, part of the reason I wanted to send this right away was to see if there was something existing or under development so that I didn't have to reinvent the wheel. Glad to hear you had a similar need for this. Do you expect it to go in soon?


http://reviews.llvm.org/D15390





More information about the llvm-commits mailing list