Gentoo Archives: gentoo-user

From: Michael Mol <mikemol@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Re: Re: Another hardware thread
Date: Wed, 23 Nov 2011 19:04:13
Message-Id: CA+czFiBEyFvTJwwP7Wj2AesZ0=5OaNu=pmT2+Lg-QzGhJpSFiw@mail.gmail.com
In Reply to: Re: [gentoo-user] Re: Re: Re: Another hardware thread by "Stefan G. Weichinger"
1 On Nov 23, 2011 1:50 PM, "Stefan G. Weichinger" <lists@×××××.at> wrote:
2 >
3 > Am 23.11.2011 18:05, schrieb Michael Mol:
4 > > On Wed, Nov 23, 2011 at 11:55 AM, Stefan G. Weichinger <lists@×××××.at>
5 wrote:
6 > >>
7 > >> Ad CFLAGS for i7-2600:
8 > >>
9 > >> Is that too much ricer-style? -->
10 > >>
11 > >> ### gcc -march=native -E -v - </dev/null 2>&1 | sed -n 's/.* -v - //p'
12 > >>
13 > >> CFLAGS="-O2 -D_FORTIFY_SOURCE=2 -march=core2 -mcx16 -msahf -maes
14 > >> -mpclmul -mpopcnt -mavx --param l1-cache-size=32 --param
15 > >> l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=generic"
16 > >>
17 > >> gcc-4.5.3-r1 ...
18 > >
19 > > That's equivalent to, what, "-O2 -D_FORTIFY_SOURCE=2 -march=native" ?
20 > > I don't see anything to complain about.
21 >
22 > Ok, thanks.
23 >
24 > compiled gcc-4.6.2 (hey, it only takes ~16min now!):
25 >
26 > # /usr/bin/gcc-4.6.2 -march=native -E -v - </dev/null 2>&1 | sed -n
27 > 's/.* -v - //p'
28 > -D_FORTIFY_SOURCE=2 -march=corei7-avx -mcx16 -msahf -mno-movbe -maes
29 > -mpclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi
30 > -mno-tbm -mavx -msse4.2 -msse4.1 --param l1-cache-size=32 --param
31 > l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=corei7-avx
32 >
33 > If I am "feeling adventurous" (Neil) I could now try my luck by choosing
34 > this nice new compiler w/ options. Maybe *after* a nice backup.
35 >
36 > > Actually, it's pretty interesting seeing what that processor comes
37 > > down to for -march=native. I wish there were a database of processors
38 > > and their decomposed compiler tuning flags for comparison. That would
39 > > be *very* interesting, from the standpoint of proc shopping and
40 > > looking at the evolution of CPUs.
41 >
42 > Wouldn't a wiki-page do the trick? gentoo-wiki ...
43 >
44 > S
45 >
46
47 ISTR gcc's i7 optimizations giving someone in here trouble within the last
48 couple weeks. As I recall, they dropped back to march and mtune=core2.

Replies

Subject Author
Re: [gentoo-user] Re: Re: Re: Another hardware thread "Stefan G. Weichinger" <lists@×××××.at>