[cfe-dev] Clang generated binary sizes
    Eric Christopher 
    echristo at apple.com
       
    Tue Jun 15 21:02:49 PDT 2010
    
    
  
On Jun 15, 2010, at 8:51 PM, Clark Gaebel wrote:
> When I use gcc to compile a C++ project I'm currently working on, the
> final executable size is 4MB.
> When I use clang++ to compile the exact same code, the final executable
> size is 7MB.
> 
> The optimization flags used are -O3 -funroll-loops and -funswitch-loops.
> 
> How can I go about diagnosing this bloat?
I'm not sure it's necessarily bloat, but you can try to find out what's going on
by looking at the code generated.  I'd particularly look at inlining of functions
as we may be doing more inlining than in your version of gcc.  Otherwise you'll
just need to look at the sizes of various functions and see why they're
larger.
-eric
    
    
More information about the cfe-dev
mailing list