[llvm-commits] [llvm-gcc-4.2] r53130 - /llvm-gcc-4.2/trunk/gcc/cgraphunit.c

Chris Lattner clattner at apple.com
Thu Jul 3 19:58:17 PDT 2008


On Jul 3, 2008, at 5:28 PM, Dale Johannesen wrote:

> Author: johannes
> Date: Thu Jul  3 19:28:07 2008
> New Revision: 53130
>
> URL: http://llvm.org/viewvc/llvm-project?rev=53130&view=rev
> Log:
> Do not emit unreferenced static functions at -O0.
> This is the gcc-4.0 behavior, changed deliberately
> in gcc-4.2, see PR 24561.  After discussion Chris,
> Evan and I agreed the 4.0 behavior is better so
> we're going back to that.
>
> Note this applies to C++, not C by default, because
> you also need -funit-at-a-time (default in C++ only).

FWIW, the major issue here is that emitting dead static functions at - 
O0 -g pulls in debug info for them.  For a simple file that includes  
something like <iostream> this is majority of the debug info,  
regardless of whether streams are used or not.

Thanks for tracking this down Dale!

-Chris




More information about the llvm-commits mailing list