[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 14:26:03 PST 2015


tejohnson added a comment.

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

> We should probably refactor splitCodeGen. It is odd that now we have
>  two parallel codegen paths. With thinLTO we already multiple BC files,
>  so it should probably look something like
>
> if (SplitForParallelCodeGen)
>
>   ProduceMultipleModules();
>
> Create the tasks.
>
> Each task handles one bc file, which may be one of the original ones
>  if using thinLto or one of the split ones.


This will require some refactoring of SplitModule() as well, which currently takes a callback (that actually creates each thread) and does the module splitting. For the case where we don't want multiple split modules, like in ThinLTO, we simply pass a single output stream. Note that in both the split and non-split case the same codegen() routine is called to do the actual codegen part.

I think I've addressed all of your other comments. PTAL. Thanks!


http://reviews.llvm.org/D15390





More information about the llvm-commits mailing list