Code Bloat g++

Zack Weinberg
Sun Feb 20 13:22:00 GMT 2000

On Sun, Feb 20, 2000 at 11:36:00AM -0800, Per Bothner wrote:
> "Martin v. Loewis" <> writes:
> > I don't know what kind of comments you were expecting. You said
> > # It seems like if we are going to do pre-compiled headers
> > and I thought "so perhaps not this year".
> Didn't Zack recently announce he had been hired (by Cygnus) to work on
> on pre-compiled headers?


> If so, I think it makes sense to at least
> think about the debug-symbol issue at the same time.
> > On your #pragma stuff, I think there is a number of problems with
> > it. First, the idea of compilation repositories does not really work
> > in my experience. I quite like the 'filter' mode of the compiler: one
> > input file, one output file. Any additional outputs will produce a lot
> > of pain, starting with getting the Makefiles right.
> Well, any time you do pre-compiled headers, you need to so some magic,
> to actually pre-compile the headers.  So whatever program/script is
> used to generate pre-compiled headers can *at the same time* compile
> the debug information.  I'm not saying we need to use the same
> *machanism* to solve the two problems of speeding up compilation and
> reducing exxcess debug info size;  however, the two should be done
> at the same time, using a single command.

Well, I'd like to facilitate smaller debug info, but I'm not sure how
precompilation helps.

The precompilation scheme I'm looking at right now basically
constructs parse trees for all the information in the headers and then
dumps that out.  Think of it as stopping right before
rest_of_(decl_)compilation, although that's not quite accurate since
the tree->RTL transform happens before that.  Debug info, as I
understand it, needs to be written after the optimizer finishes,
because it depends intimately on the form of the final assembly

However, we could store final-form assembly next to the saved trees in
the dump file.  Then, when we need a separate copy of a function, or
debug info for a type, or whatever, we just grab it and splat it into
the output stream.  This might be all we need to do template
repositories "right", too... I'm not up on the issues here.

I'm nervous about breaking semantics, though.  I want precompiled
headers to be exclusively an optimization, with no effect on the
generated code.  This is the same sort of rule as we already have for


More information about the Gcc mailing list