Code Bloat g++

Gerald Pfeifer pfeifer@dbai.tuwien.ac.at
Fri Feb 18 18:11:00 GMT 2000


On Fri, 18 Feb 2000, Martin v. Loewis wrote:
> I've considered it. However, from my (probably shallow) analysis, it
> seems that every line below is necessary.

Hmm, I feel there must be some extraneous stuff here, unless I
misunderstood:

  deneb[112]: wc -l generate.ii
   29131

  deneb[114]: grep LLBB generate.s | wc -l
   86672

That is, we have three times as many lexical blocks as lines of
preprocessed code.

Actually four times as many lexical blocks as lines of preprocessed code,
if we remove empty lines, #-lines and typedefs:

  deneb[122]: egrep '^($|#|typedef)' generate.ii | wc -l
    8163


> Now, of course, I'm somewhat confused that this bracketing is included
> in the debug information. I'd guess that the original function
> (i.e. HeuristicPT::CreatePTs(void)) indeed contains as many left and
> right brackets, as indicated above.

If you, or anyone else, is interested in preprocessed source, I'll be
happy to provide that (< 100kB as .ii.gz).

> Perhaps the LBRAC and RBRAC records serve an additional purpose even
> in absence of any local variables? Or, would it be possible to
> eliminate these records of there are no automatic variables in a
> block? Any comments appreciated.

Ah, now that sounds interesting! How many beers do we have to offer
you, Mike, to see a patch? :-)

Gerald
-- 
Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/



More information about the Gcc mailing list