[LLVMdev] code bloat example

regehr regehr at cs.utah.edu
Wed Aug 20 22:13:59 PDT 2008


Here's an example where llvm should probably be producing smaller code, 
its output is 700% larger than gcc.

regehr at john-home:~/volatile/tmp11$ llvm-gcc -Os -w small.c -o small ; 
size small
    text	   data	    bss	    dec	    hex	filename
    6324	    252	      8	   6584	   19b8	small
regehr at john-home:~/volatile/tmp11$ current-gcc -Os -w small.c -o small ; 
size small
    text	   data	    bss	    dec	    hex	filename
     784	    252	     12	   1048	    418	small

Looks easy to fix: probably at -Os the inliner should not be so aggressive.

John Regehr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: small.c
Type: text/x-csrc
Size: 1735 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080820/823fc01c/attachment.c>


More information about the llvm-dev mailing list