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

Chris Lattner clattner at apple.com
Thu Feb 24 14:43:21 PST 2011


On Feb 23, 2011, at 8:22 PM, Rafael Ávila de Espíndola wrote:

> I was updating my patch for disabling .globl matching on ELF targets and
> decided I should at least try to see how hard it would be to implement
> the proper solution with MC.
> 
> The first step is probably to switch LTO to use MC. It wouldn't make a
> lot of sense to have LTO require MC for finding definitions and then
> passing assembly to 'as'.
> 
> The attached patch converts LTO to using MC for object emission. It
> simplifies the code a lot, since now all the assembler logic is in LLVM
> itself. It also has a nice impact on performance. With the patch
> libxul.so now links in 6m30, which is about 30s less than before :-)

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 :)

-Chris



More information about the llvm-commits mailing list