[PATCH] D18945: [ThinLTO] Only compute imports for current module in FunctionImport pass

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 10 15:34:29 PDT 2016


tejohnson added a comment.

In http://reviews.llvm.org/D18945#396599, @tejohnson wrote:

> In http://reviews.llvm.org/D18945#396592, @joker.eph wrote:
>
> > About your note: `ComputeCrossModuleImport()` *is* the API I am calling in the Thin-link step.
>
>
> Right, I haven't changed that callsite and that module will also be called from the gold-plugin.


Just to clarify, it can be called from the gold plugin to compute the imports and exports to:

- guide importing (when the backend threads are launched from gold, similar to what you are doing in the libLTO case
- to optimize linkage (potentially marking changes in the index for the distributed backend case)
- to determine how to stage bitcode input files onto distributed build machines.

> 

> 

> > The export list is gonna be needed to drive a "smart" promotion/renaming, so I expect it to be needed at the same stage you need the import list. 

> 

> >  What will be the need for this?

> 

> 

> The callsite in the function importer (see the last change in this file) uses the new interface. It doesn't need to recompute all imports for all modules. Should reduce compile time in the back ends that use this pass.


This is particularly for the distributed build case where the importing is done in the back end processes.


http://reviews.llvm.org/D18945





More information about the llvm-commits mailing list