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

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 17 13:49:43 PST 2015


tejohnson added a comment.

In http://reviews.llvm.org/D15390#313349, @rafael wrote:

> I got this warning:
>
> /home/espindola/llvm/llvm/tools/gold/gold-plugin.cpp:133:17: warning: private field 'F' is not used [-Wunused-private-field]
>
>   claimed_file *F


Will fix. Looks like there are some stale comments about using this class for the join, which isn't necessary after switching to the ThreadPool. Will clean that up.


================
Comment at: tools/gold/gold-plugin.cpp:83
@@ -80,1 +82,3 @@
+  std::unique_ptr<ld_plugin_input_file> File;
+  bool Valid;
 
----------------
rafael wrote:
> OK. If we have a std::unique_ptr, we can use it instead of the Valid field, no? Valid is false iff File is null.
Good point, will fix this.

================
Comment at: tools/gold/gold-plugin.cpp:979
@@ +978,3 @@
+  // splitCodeGen will use a single thread since this has one entry.
+  std::vector<llvm::raw_pwrite_stream *> OSPtrs(1);
+  OSPtrs[0] = OS;
----------------
rafael wrote:
> If you change codegenImpl to take an ArrayRef you don't have to do this.
Ok, will change.


http://reviews.llvm.org/D15390





More information about the llvm-commits mailing list