[llvm-commits] [patch] Switch LTO to use MC

Chris Lattner clattner at apple.com
Thu Feb 24 23:14:42 PST 2011


On Feb 24, 2011, at 7:35 PM, Rafael Ávila de Espíndola wrote:
>> Very nice Rafael!  Do you have a breakdown of how much of that 6:30
>> is spent reading bitcode files, doing IR linking, doing optimization,
>> doing codegen, and doing native linking?  I'm just curious where the
>> time is going.  I would not have expected 30s for the asmprinter +
>> native assembler :)
> 
> I did some basic experiments, but they have to be updated. I remember
> the assembler taking about 12s and llvm-mc being a bit faster going from
> .s to .o. I was also surprised when the final time reduction was 30s.

Interesting!

> Doing llvm-link of all the IL files is about 3m if I remember correctly.

Wow.  Out of curiosity, is much of that time spent in type resolution stuff?  I expect that to disappear when the (post 2.9) type system rewrite happens.  I think we can make the "loading + linking" process much faster :)

> There is also some overhead just in managing so much memory. The largest
> speedup I go so far was just by merging modules as we read them. Another
> thing on these lines is trying to reuse gold mmaps. Right now we map the
> files again or malloc+read them (in the case of archive members).

Aha, very nice.  That should be possible by just reusing a memorybuffer or something.

Thanks for pushing LTO compile times forward!

-Chris





More information about the llvm-commits mailing list