Serious code size regression from 3.0.2 to now part two

tm tm@mail.kloo.net
Fri Jul 26 16:42:00 GMT 2002


On Fri, 26 Jul 2002, Joern Rennecke wrote:

> tm wrote:
> > 
> > Okay, I've started using -fno-reorder-blocks on my testcase map_fog.i, and
> > the code size is still about 10% worse than 3.0.x.
> > 
> > I think I've tracked this down to really bad branches being generated by
> > gcc. Take a look at this code sequence:
> > 

Here's a comparison of code sizes for VideoDraw32OnlyFog32Alpha from
map_fog.i:


  gcc3.0.4      gcc-CVS w/-fno-reorder-blocks
0x2702 (8306)        0x2658 (9816)


I counted 78 alignment directives (.align 5) generated by funky branch
logic. If you assume an average of 16 bytes of padding generated per
.align 5 statement, then you wind up with 1248 bytes of padding.

The empirically observed code size difference is 1510 bytes, so
approximately 262 bytes of code size bloat are still unexplained.

Toshi





More information about the Gcc-bugs mailing list