
Code: Select all
CFLAGS="-march=k8 -mtune=k8 -O2 -pipe -fomit-frame-pointer"Code: Select all
CFLAGS="-march=athlon-xp -msse2 -O2 -pipe -ftracer"gcc3.3 has not -fwebSiggiS wrote:Hi,
I wanted to give this one a try:
CFLAGS="-O3 -march=athlon-xp -pipe -fweb -frename-registers"
Code: Select all
CFLAGS="-O3 -march=athlon-xp -pipe -fweb -frename-registers"
CFLAGS="-O3 -march=athlon-xp -pipe"
Code: Select all
CFLAGS="-O2 -march=athlon-xp -maccumulate-outgoing-args -ftracer -pipe -msse2 -fPIC"
CFLAGS="-O3 -march=athlon-xp -maccumulate-outgoing-args -ftracer -pipe -msse2 -fPIC"
Makes it work 'better' when forced to use 32-bit mode?CFLAGS="-march=athlon-xp -msse2 -O2 -pipe -ftracer"
The tittle thread is quite clear:ReeferMac wrote:OK, maybe I'm just being thick... I want 64 bit optimization, NOT 32-bit.
I have a feeling I'm missing something to the conversation here. I understand the cpu will 'pretend' it runs in 32-bit mode when it has to, but I want to set things to optimize as much as possible, for the fact that it's a 64-bit chip under the hood... I'll willing pay a performance hit when I have 32-bit only code.
Does that make my question clearer?
It sounds like what you're telling me is that the compile options do what I want, when it knows it's an AMD64-CPU (which is what the "x86_64-pc-linux-gnu" setting does), but this second option of
Makes it work 'better' when forced to use 32-bit mode?CFLAGS="-march=athlon-xp -msse2 -O2 -pipe -ftracer"
Sorry, it's Sunday, my brain just isn't working this morning.
- Mac
Code: Select all
Which CFLAGS to you use to install gentoo-x86 on Athlon64 ?
Also he talks about installing a 32 bits gentoo (gentoo-x86) on another partition. So it is clear he wants what tittle says...Hi,
Just thinkin about to install 32bit-gentoo on another partition. What are the best CFLAGS to you use to kick the last bit of performance out of the Athlon.
Code: Select all
-march=k8
-mtune=k8
-ftracer
Perform tail duplication to enlarge superblock size. This transformation simplifies the control flow of the function
allowing other optimizations to do better job.
gcc3.4: -O3 = -O2 -finline-functions -frename-registers -fweb
gcc3.3: -O3 = -O2 -finline-functions -frename-registers
or just -O2
-fomit-frame-pointer
-maccumulate-outgoing-args
If enabled, the maximum amount of space required for outgoing arguments will be computed in the function prologue.
This is faster on most modern CPUs because of reduced dependencies, improved scheduling and reduced stack usage when
preferred stack boundary is not equal to 2. The drawback is a notable increase in code size. This switch implies
-mno-push-args.
-pipe
Use pipes rather than temporary files for communication between the various stages of compilation. This fails to
work on some systems where the assembler is unable to read from a pipe; but the GNU assembler has no trouble.
Code: Select all
-mmmx
-m3dnow
-msse
-msse2
-mfpmath=sse This is the default choice for the x86-64 compiler.
-mpreferred-stack-boundary=num, (4 bytes for x86, and 8 bytes for x86-64)
Code: Select all
gcc -v -Q $CFLAGS blah.c
Code: Select all
-fprefetch-loop-arrays
If supported by the target machine, generate instructions to prefetch memory to improve the performance of loops that
access large arrays.
-funroll-loops
Unroll loops whose number of iterations can be determined at compile time or upon entry to the loop. -funroll-loops
implies both -fstrength-reduce and -frerun-cse-after-loop. This option makes code larger, and may or may not make it
run faster.
-funroll-all-loops
Unroll all loops, even if their number of iterations is uncertain when the loop is entered. This usually makes pro-
grams run more slowly.
-mfpmath=sse,387
-ffast-math
Code: Select all
http://forums.gentoo.org/viewtopic-p-2171229-highlight-.html?sid=c1602bb94706f59f64b9423c406ad87c#2171229
Just a friendly advice, you should have closed the URL in the BBCode for URL like this;kamisama wrote:As far as I can tell all but one of the guys in here is looking for the best cflags for a 32bit mode - amd64.
The thread I made had some very useful information. It got closed and I got redirected here. Since this thread sucks. Read mine.
Code: Select all
http://forums.gentoo.org/viewtopic-p-2171229-highlight-.html?sid=c1602bb94706f59f64b9423c406ad87c#2171229
Code: Select all
[url]....[/url]Code: Select all
CFLAGS="-march=athlon-xp -msse2 -O2 -pipe"Code: Select all
CFLAGS="-pipe -O2 -march=athlon64"