[llvm-dev] (Thin)LTO llvm build

Carsten Mattner via llvm-dev llvm-dev at lists.llvm.org
Mon Sep 26 10:10:25 PDT 2016

On Mon, Sep 26, 2016 at 5:16 PM, Teresa Johnson <tejohnson at google.com> wrote:
> On Mon, Sep 26, 2016 at 8:08 AM, Carsten Mattner <carstenmattner at gmail.com> wrote:
>> On Mon, Sep 26, 2016 at 4:25 PM, Teresa Johnson <tejohnson at google.com> wrote:
>> > No worries, thanks for the update. Teresa
>> 2048 wasn't enough. Bumped to 4096. Only 1300 ninja targets left.
>> Once I've been successful with this, I might try building a ThinLTO Firefox
>> or maybe Chromium,
> I have built both of those successfully with ThinLTO, so they should work.

Sounds good.

>> although browsers usually have PGO profiles one
>> can run for feeding back real-world exercise. Not sure if PGO can be
>> combined with LTO, or if it makes sense at all...
> Yes, absolutely! ThinLTO and PGO are largely orthogonal, but PGO will help enable
> more indirect call promotion with ThinLTO, and there is also a patch out for review (D24638)
> to use FDO to guide ThinLTO function importing heuristics.

Also sounds good.

>> What would be more fun is combining ThinLTO for C code with MLton
>> for SML code when building Ur/Web.
> Interesting. I am not at all familiar with SML code/building, but theoretically switching the C code to
> use -flto=thin shouldn't affect the interaction between those two compiles. Presumably one or both
> are compiled into a library and linked in to create a final binary?

Ur/Web consists of C and SML code, and I'd have to take a deep dive before
I could say how it's linked, but basically yes,the finaly piece is a combination
of object code from C and SML sources. I thought given MLton's whole program
optimizer, ThinLTO might be natural extension of the build process.
Just because :).

More information about the llvm-dev mailing list