[cfe-dev] Best practices

Domagoj Saric domagoj.saric at littleendian.com
Thu Sep 27 09:48:14 PDT 2012


On 23.9.2012. 16:21, Devchandra L Meetei wrote:
 > Hi clangers
 > is there any best practices which can be used to to reduce disk footprints of
 > executable and lib generated by clangs,
 > Usually binaries generated by clang is larger than those of gcc.


I can confirm that Clang's record WRT codegen size is quite far from good. The 
main problems I've identified are:
- excessive inlining (even with -Os)
- template bloat
- no support for fno-inline, -fno-inline-functions or -finline-limit

Here are some related tickets by me (you can find some tips how to "minimize 
damage"):
http://llvm.org/bugs/show_bug.cgi?id=11625
http://llvm.org/bugs/show_bug.cgi?id=11633

By others:
http://llvm.org/bugs/show_bug.cgi?id=4435
http://llvm.org/bugs/show_bug.cgi?id=4573
http://llvm.org/bugs/show_bug.cgi?id=5124
http://llvm.org/bugs/show_bug.cgi?id=11083

These don't help either:
http://llvm.org/bugs/show_bug.cgi?id=11544
http://llvm.org/bugs/show_bug.cgi?id=11624


...from the date of the tickets and lack of response one can only deduce that 
this is of no or very low priority to Clang developers (or in "bitch mode": they 
only care about synthetic benchmarks and not about real world behaviour)... :/


-- 
"What Huxley teaches is that in the age of advanced technology, spiritual
devastation is more likely to come from an enemy with a smiling face than
from one whose countenance exudes suspicion and hate."
Neil Postman



More information about the cfe-dev mailing list