This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Code Bloat g++


> 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.

I think there is a counting error here: Each LLBB symbol appears twice
- once before the instruction that starts the block, and once in the
debugging information.

Counting lexical blocks is perhaps also easier with

tr -cd '{' <generate.ii | wc -c

Of course, this probably still gives more blocks than appear in
source. Some are apparently redundant, however, there are also good
reasons for others. For example, I guess inline functions result in
new lexical blocks every time they are inlined.

Regards,
Martin

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]