The speed of the compiler, was: Re: Combine four insns

Cary Coutant ccoutant@google.com
Mon Aug 9 23:13:00 GMT 2010


>>> Additionally, the very worst offender in terms of compile time is -g. The
>>> size of debugging information is such, that I/O and communication times
>>> increase significantly.
>>
>> I assume you already made -pipe the default, and verified that the
>> piping to the assembler works properly?
>
> Yes.  Cary (CC'd) can provide more details, but the core of the issue is the
> massive size of the debug info.  This causes machines to run out of memory,
> increased transmission times, etc.  Builds already occur in tmpfs, so I/O is
> not an issue.  Transmission costs are, however.

As Diego mentioned in a follow-up, we haven't found the cost of the
assembler intermediate to be a problem (at least not yet). What hurts
is the size of the object files themselves, with all of the duplicate
debug info that hasn't yet been eliminated by the linker (we're using
-gdwarf-4 and its ability to put debug type info into comdat
sections). Adding the --compress-debug-sections option to gas helped
quite a bit there.

I'd rephrase Diego's last two sentences, however, as "I/O is the
issue, but with tmpfs, the I/O happens outside the compiler and
linker."

-cary



More information about the Gcc-patches mailing list