public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* powercp-linux cross GCC 4.2 vs GCC 4.0.0: -Os code size regression?
@ 2008-01-16 11:24 Sergei Poselenov
  2008-01-16 12:15 ` Duncan Sands
  2008-01-16 13:17 ` Andrew Haley
  0 siblings, 2 replies; 21+ messages in thread
From: Sergei Poselenov @ 2008-01-16 11:24 UTC (permalink / raw)
  To: gcc

Hello all,

I'm using the ppc-linux gcc-4.2.2 compiler and noted the code
size have increased significantly (about 40%!), comparing with
old 4.0.0 when using the -Os option. Same code, same compile-
and configuration-time options. Binutils are differ
(2.16.1 vs 2.17.50), though.

I've looked at the CSiBE testing results for ppc-elf with -Os,
comparing gcc_4_0_0 with mainline and found that the mainline
actually optimizes better, at least for the CSiBE test environment.
After some analysis I've came to the following results:
  Number of packages in the CSiBE test environment: 863
  N of packages where mainline GCC optimizes better:   290
  N of packages where mainline GCC optimizes worse: 436

And the regression in code size is up to 40%, like in my case.

What I'm missing here? Apparently, just "-Os" is not enough to
get the best size-optimized code?

Currently, it builds as following:
ppc-linux-gcc -g  -Os   -fPIC -ffixed-r14 -meabi -fno-strict-aliasing 
-D__KERNEL__ -DTEXT_BASE=0xfffc0000  -I/work/psl/tmp/u-boot/include 
-fno-builtin -ffreestanding -nostdinc -isystem 
/opt/eldk-4.2-01-08/usr/bin/../lib/gcc/powerpc-linux/4.2.2/include 
-pipe  -DCONFIG_PPC -D__powerpc__ -DCONFIG_4xx -ffixed-r2 -ffixed-r29 
-mstring -msoft-float -Wa,-m440 -mcpu=440 -DCONFIG_440=1 -Wall 
-Wstrict-prototypes -c -o interrupts.o interrupts.c

What would you suggest?

Thanks for any help,
Sergei

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2008-01-21 15:46 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-16 11:24 powercp-linux cross GCC 4.2 vs GCC 4.0.0: -Os code size regression? Sergei Poselenov
2008-01-16 12:15 ` Duncan Sands
2008-01-16 12:19   ` Sergei Poselenov
2008-01-16 12:35     ` Duncan Sands
2008-01-16 13:20     ` Andrew Haley
2008-01-16 13:17 ` Andrew Haley
2008-01-16 15:59   ` Sergei Poselenov
2008-01-16 17:10     ` Andrew Haley
2008-01-16 17:14       ` Sergei Poselenov
2008-01-16 19:36         ` Andrew Haley
2008-01-17 14:52           ` powercp-linux cross GCC 4.2 vs GCC 4.0.0: -Os code size regression? [Emcraft #11717] Sergei Poselenov
2008-01-17 15:11             ` Richard Guenther
2008-01-17 18:27             ` Gabriel Paubert
2008-01-19 16:26               ` Andrew Haley
2008-01-19 16:35                 ` David Edelsohn
2008-01-19 16:51                   ` Andrew Haley
2008-01-19 19:10                     ` David Edelsohn
2008-01-21 17:25                     ` powercp-linux cross GCC 4.2 vs GCC 4.0.0: -Os code size regression? (filed bug 34903)[Emcraft #11717] Sergei Poselenov
2008-01-17 12:14     ` powercp-linux cross GCC 4.2 vs GCC 4.0.0: -Os code size regression? Gabriel Paubert
2008-01-17 12:47       ` Sergei Poselenov
2008-01-17 13:10         ` Gabriel Paubert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).