[LLVMdev] LTO, plugins and binary sizes
Rafael Espindola
espindola at google.com
Sat Oct 9 10:51:02 PDT 2010
For some time now I was curious on what the size impact of LTO was. I
decided to test this with a large C++ app, clang was a natural choice.
With PR8313 fixed with the proposed patch and PR8300 avoided by
disabling constructor aliasing I was able to hack clang to bootstrap
with LTO enabled using the gold plugin.
I did the testing on linux x86-64. Gcc is the 4.4.4 included with
Fedora 13. The results are:
gcc -O3: 32MB
gcc -Os: 25MB
clang lto -Os: 22MB
I then decided to try to link without export-dynamic, since it
produces some fairly large tables and blocks many optimizations. The
new results were
gcc -O3: 30MB
gcc -Os: 23MB
clang lto -Os: 18 MB
The full patches I used are attached. I hope to get the non-hackish
bits reviewed, starting by the fix to 8313.
Cheers,
--
Rafael Ávila de Espíndola
More information about the llvm-dev
mailing list