[cfe-dev] Compilation benchmark: bzip2

Chris Lattner clattner at apple.com
Thu Jan 3 14:05:13 PST 2008


On Dec 23, 2007, at 4:24 PM, Sanghyeon Seo wrote:
> 2007/12/24, Chris Lattner <clattner at apple.com>:
>> There is a bigger question though: do we want to link more and more
>> llvm libraries into clang at this point?  In addition to the bitcode
>> writer, you'd eventually want the codegen and target libraries as
>> well.  The bigger issue with this is that it increases link times of
>> clang and most people aren't using it right now.
>
> I'd like to point out that bitcode writer was already linked with
> clang (I suppose for use with AST serialization) and my patch didn't
> increase link time at all.

Ok!

>> For now, if you want the bcwriter, I'd say go ahead and add it.  If
>> you want the target libraries though, I'd suggest building them
>> together into a single "backend" dylib/so file that is loaded by
>> clang.  That way we can rebuild clang without relinking all the llvm
>> pieces.
>
> How do I do that? :)

I'm not sure what the best way is :).

> By the way, my idea was to have a wrapper script that behaves like
> gcc, which calls clang -emit-bc for gcc -c and llvm-ld -native for gcc
> linking.

Sure, that sounds like a good short-term solution.  Longer term, Anton  
is working on revamping the 'llvmc' tool into a proper compiler  
driver, which should solve some of these problems.

> What is the difference between running opt on individual bitcode files
> and running llvm-ld -O2 over all bitcode files?

They run a very different set of optimization passes.

-Chris



More information about the cfe-dev mailing list