Alexander Leidinger wrote:
>Looking at the source of gcc (toplev.c):
> -fexpensive-optimizations is activated with -O2 or higher,
> -fschedule-insns2 might be also activated with -O2 or higher (I think
> it is),
> -O6 didn't exist (3 is the highest value for gcc).
>
>You might also try if adding "-fmove-all-movables -freduce-all-givs
>-fsched-interblock -fbranch-count-reg -fforce-addr" does something valuable.
>
I made some checks using gcc 3.0.2 (compiled by myself using default
configuration for Linux) on my Duron. I made tests, and here are results:
1) On my machine, Lame's configure script seems to set -O3
-fomit-frame-pointer -ffast-math -funroll-loops
2) Here's a list of enabled options in gcc 3.0.2 when no special command
lines options are given:
# GNU C++ version 3.0.2 (i686-pc-linux-gnu)
# compiled by GNU C version 3.0.2.
# options passed: -v -iprefix -D__GNUC__=3 -D__GNUC_MINOR__=0
# -D__GNUC_PATCHLEVEL__=2 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__
# -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__
# -D__STDC_HOSTED__=1 -W -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386
# -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ -D__GNUG__=3
# -D__GXX_DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -W
# -fverbose-asm
# options enabled: -fpeephole -ffunction-cse -fkeep-static-consts
# -fpcc-struct-return -fsched-interblock -fsched-spec -fbranch-count-reg
# -fexceptions -fcommon -fverbose-asm -fgnu-linker -fargument-alias -fident
# -fmath-errno -m80387 -mhard-float -mno-soft-float -mieee-fp
# -mfp-ret-in-387
3) Here's a similar list when -march=athlon -O3 are in effect:
# GNU C++ version 3.0.2 (i686-pc-linux-gnu)
# compiled by GNU C version 3.0.2.
# options passed: -v -iprefix -D__GNUC__=3 -D__GNUC_MINOR__=0
# -D__GNUC_PATCHLEVEL__=2 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__
# -D__linux__ -D__unix -D__linux -Asystem=posix -D__OPTIMIZE__
# -D__STDC_HOSTED__=1 -W -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386
# -D__i386 -D__i386__ -D__athlon -D__athlon__ -D__tune_athlon__
# -D__GNUG__=3 -D__GXX_DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100
# -march=athlon -O3 -W -fverbose-asm
# options enabled: -fdefer-pop -fcse-follow-jumps -fcse-skip-blocks
# -fexpensive-optimizations -fthread-jumps -fstrength-reduce -fpeephole
# -fforce-mem -ffunction-cse -fkeep-static-consts -fcaller-saves
# -fpcc-struct-return -fgcse -frerun-cse-after-loop -frerun-loop-opt
# -fdelete-null-pointer-checks -fschedule-insns2 -fsched-interblock
# -fsched-spec -fbranch-count-reg -fexceptions -freorder-blocks
# -frename-registers -fcommon -fverbose-asm -fgnu-linker -fregmove
# -foptimize-register-move -fargument-alias -fstrict-aliasing -fident
# -fpeephole2 -fguess-branch-probability -fmath-errno -m80387 -mhard-float
# -mno-soft-float -mieee-fp -mfp-ret-in-387 -march=athlon
4) So, -fsched-interblock and -fbranch-count-reg are also automatically
enabled with -O3 (according to docs also)
5) I also tried playing with -fmove-all-movables -fsched-spec-load
-fforce-addr -freduce-all-givs -foptimize-sibling-calls. Their effect
was very small. It seemed that -fforce-addr actually slowed encodeing
down 1%, while -fmove-all-movables made it faster the same amount.
However, I'm very sceptical about that small differences. On my Duron,
-malign-double made encoding ~1% faster. The differences were so small
that I ended up trusting gcc's developers and set my options to
"-march=athlon -mcpu=athlon -malign-functions=4 -malign-double". And
even there, gcc docs say that -march=athlon implies -mcpu=athlon, but I
seem to remember there was some discussion about it on this list so I
left both options.
--
------------ Matti Rintala -------- [EMAIL PROTECTED] ---------
"When the remarkable turns bizarre, reason turns rancid."
Cheshire Cat in "American McGee's Alice"
_______________________________________________
mp3encoder mailing list
[EMAIL PROTECTED]
http://minnie.tuhs.org/mailman/listinfo/mp3encoder