View previous topic :: View next topic |
Author |
Message |
Klavs Guru
Joined: 22 May 2002 Posts: 536 Location: Denmark
|
Posted: Thu May 30, 2002 7:56 am Post subject: GCC-3.1 optimal arch flags automagically |
|
|
Hi guys,
I was thinking that if we collected the optimal arch-flags for gcc-3.1 for all archs, this could be included in gentoo-iso, so emerge could automagically select the optimal flags for you - this way gentoo will automagically stay on top, as a super-optimized dist. What do you think?
Also, it would be great to know if profiling will improve speed on the given CPU-type - or is that more program dependant? from the benchmarks I've seen on gcc-3.1 with profiling it should definetely give approx. 5-10% extra - which is a lot in my mind. see https://forums.gentoo.org/viewtopic.php?t=2912 .
flags for:
Pentium
Pentium Pro (has MMX - any without?)
PII (has MMX - also other stuff?)
PIII (has MMX? - also other?)
K6-2
K6-3
Athlon
Athlon-XP
CHOST = i686-pc-linux-gnu
CXXFLAGS = -march=athlon-xp -m3dnow -msse -mfpmath=sse -mmmx -O3 -pipe
CFLAGS = -march=athlon-xp -m3dnow -msse -mfpmath=sse -mmmx -O3 -pipe
PPC
others..? _________________ Best regards,
Klavs Klavsen
Denmark
Working with Unix is like wrestling a worthy opponent.
Working with windows is like attacking a small whining child
who is carrying a .38. |
|
Back to top |
|
|
Niek Apprentice
Joined: 14 May 2002 Posts: 236 Location: Houten, The Netherlands
|
|
Back to top |
|
|
kode54 n00b
Joined: 16 May 2002 Posts: 42
|
Posted: Thu May 30, 2002 12:36 pm Post subject: |
|
|
According to that document, the -mmmx, -msse, -msse2, -m3dnow, only enable (or disable in the case of the -mno_* variants) macro/functions that execute assembly instructions from the respective sets. They have nothing to do with automatic optimization of existing code. |
|
Back to top |
|
|
lx Veteran
Joined: 28 May 2002 Posts: 1012 Location: Netherlands
|
Posted: Thu May 30, 2002 12:38 pm Post subject: |
|
|
defining march=athlon-xp probably is enough and -m3dnow -msse -mmx is already used don't know about mfpmath buth i think so (march compiles the program for that particular architecture, 3dnow etc are part of that architecture). Besides a part of Xfree will not compile with march=athlon / march=athlon-tbird, i had to add -mno-mmx -mno-3dnow so it's probably included in march=athlon. Think that march=<architecture> -O3 gives the most optimal result and maybe -O2 should be used to avoid stability issues, if there are options that won't break the code, why aren't they included by the gcc coders????. Well that's one thing to find out then, , let's get this thing straightend out once and for all, but how do you want to test the performance gain / stability issues????
See ya, lX _________________ "Remember there's a big difference between kneeling down and bending over.", Frank Zappa |
|
Back to top |
|
|
Klavs Guru
Joined: 22 May 2002 Posts: 536 Location: Denmark
|
Posted: Thu May 30, 2002 2:11 pm Post subject: |
|
|
In regards to performance tests, I figured the way these guys has done it - isn't a bad one - see https://forums.gentoo.org/viewtopic.php?t=2912
In regards to stability - as with all code, only time and enough users will tell.. can there be any other way? _________________ Best regards,
Klavs Klavsen
Denmark
Working with Unix is like wrestling a worthy opponent.
Working with windows is like attacking a small whining child
who is carrying a .38. |
|
Back to top |
|
|
Lovechild Advocate
Joined: 17 May 2002 Posts: 2858 Location: Århus, Denmark
|
Posted: Thu May 30, 2002 2:53 pm Post subject: |
|
|
Klavs wrote: |
In regards to stability - as with all code, only time and enough users will tell.. can there be any other way? |
Better coders ? |
|
Back to top |
|
|
Pigeon Guru
Joined: 21 Jun 2002 Posts: 307
|
Posted: Fri Jun 21, 2002 9:25 am Post subject: |
|
|
Pentium Pro's don't support MMX.
Pentium II's support MMX.
Pentium III's support MMX and SSE.
Pentium 4's support MMX, SSE, and SSE2, I think. (I know they have SSE2- don't know if they're backward compatable, though I'd assume they are)
All AMD's that are K6-3+ (I think... possibly K6-2) have 3dnow.
Which (if any) AMD processors have MMX and SSE support? I can't remember my history lessons =( (I wouldn't be suprised if none of them did... for some reason I thought SSE and MMX are proprietary) |
|
Back to top |
|
|
mglauche Retired Dev
Joined: 25 Apr 2002 Posts: 564 Location: Germany
|
Posted: Fri Jun 21, 2002 10:48 am Post subject: |
|
|
hmm, my duron 1,3 k has:
3dnow, 3dnow+,mmx, mmx+ and sse (not sse2)
the lower durons don't have see flags |
|
Back to top |
|
|
karmakillernz n00b
Joined: 01 May 2002 Posts: 55
|
Posted: Fri Jun 21, 2002 7:56 pm Post subject: |
|
|
Pigeon wrote: |
All AMD's that are K6-3+ (I think... possibly K6-2) have 3dnow.
Which (if any) AMD processors have MMX and SSE support? I can't remember my history lessons =( (I wouldn't be suprised if none of them did... for some reason I thought SSE and MMX are proprietary) |
Yea K6/2's have 3dnow (I used to have one ) and all (at least from the K6/2) have mmx, and all Athlons have SSE (But not sse2). |
|
Back to top |
|
|
petecool n00b
Joined: 17 Apr 2002 Posts: 11 Location: Laval, Québec, Canada
|
Posted: Sun Jun 23, 2002 7:23 pm Post subject: |
|
|
Quote: | ...and all Athlons have SSE (But not sse2). |
That is not true, only Athlon XP and second generation Durons (they start at 1 or 1.1 Ghz, I'm not sure - they have an Xp-like core) have sse. |
|
Back to top |
|
|
Tuxisuau Apprentice
Joined: 04 May 2002 Posts: 213 Location: Catalunya (Europe)
|
Posted: Mon Jun 24, 2002 4:19 am Post subject: sse |
|
|
Quote: |
only Athlon XP and second generation Durons (they start at 1 or 1.1 Ghz, I'm not sure - they have an Xp-like core) have sse.
|
I'm not sure, but i think all socket A athlons (since athlon-tbird, the first one AFAIK) do have sse.[/quote] _________________ IM me at tuxisuau@jabber.7a69ezine.org |
|
Back to top |
|
|
Safrax Guru
Joined: 23 Apr 2002 Posts: 422
|
Posted: Mon Jun 24, 2002 3:02 pm Post subject: |
|
|
The slot Athlons and the TBird Athlons *DO NOT* have sse support. Only the newer Athlon-XP's (aka palomino) have SSE support. |
|
Back to top |
|
|
slik n00b
Joined: 18 Apr 2002 Posts: 48 Location: Alberta, Canada
|
Posted: Tue Jun 25, 2002 8:31 pm Post subject: |
|
|
lx wrote: | defining march=athlon-xp probably is enough and -m3dnow -msse -mmx is already used don't know about mfpmath buth i think so (march compiles the program for that particular architecture, 3dnow etc are part of that architecture). Besides a part of Xfree will not compile with march=athlon / march=athlon-tbird, i had to add -mno-mmx -mno-3dnow so it's probably included in march=athlon. Think that march=<architecture> -O3 gives the most optimal result and maybe -O2 should be used to avoid stability issues, if there are options that won't break the code, why aren't they included by the gcc coders????. Well that's one thing to find out then, , let's get this thing straightend out once and for all, but how do you want to test the performance gain / stability issues????
See ya, lX |
see here to find which flags are automatically set for your given -O? option |
|
Back to top |
|
|
Forge Tux's lil' helper
Joined: 20 Jun 2002 Posts: 125 Location: KOP, PA, USA
|
Posted: Wed Jul 03, 2002 6:02 pm Post subject: |
|
|
Please see my comments in this thread to determine what features your K7 does/does not have. |
|
Back to top |
|
|
|