[PATCH] D19351: ELF: Add initial ThinLTO support.

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Fri May 13 09:45:12 PDT 2016


> On May 13, 2016, at 5:21 AM, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:
> 
>>> If it is possible for lld/gold/LTO to share more code, excellent but:
>>> 
>>> * I would probably not put that in lib/LTO. Lets keep that just for
>>> the existing api.
>> 
>> 
>> Putting the new API in some other lib makes sense to me.
>> 
>> 
>> 
>> Can you elaborate on the rational for that? It does not seem obvious to me
>> (i.e. that's where I'd go for any new API that is dedicated to LTO).
> 
> The existing LTO api has a lot of history and is very different from
> what we want to do in the gold plugin and lld. This is similar to
> splitting out the IRMover, except sufficiently larger that I think an
> independent library that lld, gold (and lib/LTO?) use makes sense and
> avoids accidentally adding another use of the old API.

llvm/lib/LTO had until recently *2* files (LTOCodeGenerator.cpp,  LTOModule.cpp), it seems to be one of the smallest library in LLVM, it seems surprising to me to have to go with another one (for example when someone brings a new DCE pass, it'll go in the same lib as the existing one...).

That said, the place it ends into is not my main concern.

-- 
Mehdi



More information about the llvm-commits mailing list