-fno-align-functions still adds padding on i386 on gcc3.1
John Baldwin
jhb@FreeBSD.org
Thu May 16 20:07:00 GMT 2002
On 17-May-2002 Richard Henderson wrote:
> See PR 6627, and the attached analysis.
Thanks. Someone else discovered that the additional function padding
wasn't actually making up that much of a difference but that using
-fno-guess-branch-probability cut down on the generated code size
considerably. Perhaps -Os should not enable this optimization?
An extract from the commit message in which -fno-guess-branch-probability
was turned on is here:
Saved 176 bytes by compiling with -fno-guess-branch-probability. The
default of -fguess-branch-probablility causes time optimizations (?)
like rewriting `if (foo) x++;' as
`if (!foo) goto forth; back: ; ...; forth: x++; goto back;". This is
pessimizes space especially well on i386's because one short branch
gets converted to 2 long ones.
If there is interest I can try to produce a small test case to demonstrate
that this optimization increases code size.
--
John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
More information about the Gcc-bugs
mailing list