Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GCC optimazion?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
IVIikko
Tux's lil' helper
Tux's lil' helper


Joined: 07 Feb 2005
Posts: 99
Location: Helsinki, Finland

PostPosted: Sun Apr 17, 2005 12:47 pm    Post subject: GCC optimazion? Reply with quote

Which are good optimazion flags "CFLAGS" for gcc and other software on amd64?
Back to top
View user's profile Send private message
inode77
Veteran
Veteran


Joined: 20 Jan 2004
Posts: 1303
Location: Heart of Europe

PostPosted: Sun Apr 17, 2005 2:04 pm    Post subject: Reply with quote

Here are the standard safe ones:
http://gentoo-wiki.com/Safe_Cflags#Opteron.2FAthlon64_.28AMD.29
Back to top
View user's profile Send private message
Psykk
n00b
n00b


Joined: 04 Feb 2005
Posts: 49

PostPosted: Sun Apr 17, 2005 4:30 pm    Post subject: Reply with quote

Any problems with O3, anyone? I don't trust any optimizer that isn't doing inlining for stuff like small operators.
_________________
The GPL is Harmful
Back to top
View user's profile Send private message
Lucifeer
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jun 2004
Posts: 110
Location: Sweden

PostPosted: Sun Apr 17, 2005 5:21 pm    Post subject: Reply with quote

been running theese flags for a month or so
Code:
CFLAGS="-march=athlon64 -mtune=athlon64 -O3 -pipe -ftracer"
LDFLAGS="-Wl,-O1"
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"
The only package that didnt compile with thoose flags was libid3 didnt work with "-fvisibility-inlines-hidden"

Psykk wrote:
Any problems with O3, anyone? I don't trust any optimizer that isn't doing inlining for stuff like small operators.
Not that I've noted
_________________
Amd64 3200+ 1024DDR - workstation
AmdXP 1800+ 512sdram - server
Celeron 1.2ghz 128sdram - laptop
AMD64 live-cd w/Reiser4-support http://livecd.todesmut.org/
Back to top
View user's profile Send private message
saffron
n00b
n00b


Joined: 28 Sep 2004
Posts: 22
Location: Redmond, WA

PostPosted: Sun Apr 17, 2005 7:40 pm    Post subject: Reply with quote

I have been running -O3 -march=k8 -pipe with no problems but I am considering changing that, I have read that most benchmarks do worse with 03 than 02...
Anyone have a definitive answer on the best??
Back to top
View user's profile Send private message
inode77
Veteran
Veteran


Joined: 20 Jan 2004
Posts: 1303
Location: Heart of Europe

PostPosted: Sun Apr 17, 2005 8:53 pm    Post subject: Reply with quote

There's no definitve answer to that question. Run a benchmark for each app with both optimizations to know which it is for that specific package.
A encoder for mp3 like lame may benefit greatly from O3 but normalday apps may be slowed down due to the fact that O3 generate binaries that are much bigger than O2. Then that has some impact concerning CPU cache size/speed and level, so there's no general answer.
For me a reason more to run O2 even if my CPU has 1M cache is that less optimizations normally are breaking less packages, so I predict a more stable sys.
Just my 20cent (or rappen or centimes or whatever ;-))
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum