[LLVMdev] RFC: ThinLTO Impementation Plan
Teresa Johnson
tejohnson at google.com
Fri May 15 23:11:19 PDT 2015
On Thu, May 14, 2015 at 4:29 PM, Duncan P. N. Exon Smith
<dexonsmith at apple.com> wrote:
>
>> On 2015-May-13, at 11:44, Teresa Johnson <tejohnson at google.com> wrote:
>>
>> a. LTO directory structure:
>>
>> Restructure the LTO directory to remove circular dependence when
>> ThinLTO pass added. Because ThinLTO is being implemented as a SCC pass
>> within Transforms/IPO, and leverages the LTOModule class for linking
>> in functions from modules, IPO then requires the LTO library. This
>> creates a circular dependence between LTO and IPO. To break that, we
>> need to split the lib/LTO directory/library into lib/LTO/CodeGen and
>> lib/LTO/Module, containing LTOCodeGenerator and LTOModule,
>> respectively. Only LTOCodeGenerator has a dependence on IPO, removing
>> the circular dependence.
>>
>
> I wonder whether LTOModule is a good fit (it might be; I'm not sure).
> We still use it in libLTO, but gold-plugin.cpp no longer uses it,
> instead using lib/Object and lib/Linker directly.
>
Forgot to answer this one. I noticed that it was used in some paths
(like by llvm-lto) but not by gold which invokes the lower level
routines more directly. It was convenient to use LTOModule to
encapsulate this, but is there a deliberate movement away from it?
--
Teresa Johnson | Software Engineer | tejohnson at google.com | 408-460-2413
More information about the llvm-dev
mailing list