Gentoo Archives: gentoo-amd64

From: "Sami Näätänen" <sn.ml@××××××××××××.fi>
To: gentoo-amd64@l.g.o
Subject: [gentoo-amd64] CFLAGS question from a AMD64 newbie
Date: Tue, 09 Dec 2008 12:23:35
Message-Id: 200812091423.30562.sn.ml@keijukammari.fi
1 So hi from a amd64 newbie. Not so newbie with Gentoo though. :)
2
3 My system is an Intel quad core core2 with a 2.4 GHz clock speed coupled with
4 a 4GB of memory. No overclocking etc. Want this to be stable. :)
5
6 I'm just curious what people use as their stable CFLAGS in amd64 Gentoo?
7 (Sorry if this has been up lately, but I just switched to 64bit env so...)
8
9
10 Here is mine and some explanation of why (And I use ~arch system with gcc 4.3)
11
12 The flags are in order they are used in my CFLAGS and CXXFLAGS.
13
14 Gives stable base
15 -O2
16
17 Want to optimize for my system, but don't want "native"
18 -march=core2
19
20 If some ebuilds filter march this will still cache optimize etc for my system
21 -mtune=core2
22
23 Faster floating point math and better chance of vectorization
24 -mfpmath=sse
25
26 These because of the march might get filtered
27 -mmmx -msse -msse2 -msse3 -mssse3
28
29 For loop vectorization
30 -ftree-vectorize
31
32 Just to get some Idea how much vectorized loops there will be.
33 By the way I surprised the amount of "LOOP VECTORIZED" notes in the compile
34 output. And only have seen couple of two versions
35 -ftree-vectorizer-verbose=1
36
37 Of course I don't want temp files :)
38 -pipe
39
40
41 I don't use any loop unrolling etc, because it would only add the code size.
42 I'm not so brave that I would dare to use -Os.
43
44 So what's your experiences and reasoning behind what you do?
45 Any benchmarks or so?
46
47
48 PS. If you see same post without this added postscript. Just ignore it, it's
49 the same post, but I forgot to change my default identity for this ML.

Replies

Subject Author
Re: [gentoo-amd64] CFLAGS question from a AMD64 newbie Martin Herrman <martin@×××××××.nl>
Re: [gentoo-amd64] CFLAGS question from a AMD64 newbie Volker Armin Hemmann <volker.armin.hemmann@××××××××××××.de>
[gentoo-amd64] Re: CFLAGS question from a AMD64 newbie Duncan <1i5t5.duncan@×××.net>