[arch-dev-public] x86_64: improving default CFLAGS
http://bbs.archlinux.org/viewtopic.php?id=27139 after some discussions in this thread we want to change our default compiler flags. we want to make use of the SSE3 extensions most x86_64 cpus have. to not break backward compatibility for those few early cpus that lack SSE3 extensions we want to do it with -mtune. this is how we want to set it for the future: CFLAGS="-march=x86-64 -mtune=nocona -O2 -pipe" CXXFLAGS="-march=x86-64 -mtune=nocona -O2 -pipe" some testing is still required. i would like to put a modified version of pacman to testing right after it has moved to current. when everything is ok we would ask the pacman devs to change it to the default makepkg.conf. please discuss. Andy (for i686 are also some speedups possible but that's not my task)
Am Sat, 31 Mar 2007 12:31:20 +0200 schrieb Andreas Radke <a.radke@arcor.de>:
http://bbs.archlinux.org/viewtopic.php?id=27139
after some discussions in this thread we want to change our default compiler flags. we want to make use of the SSE3 extensions most x86_64 cpus have.
to not break backward compatibility for those few early cpus that lack SSE3 extensions we want to do it with -mtune. this is how we want to set it for the future:
CFLAGS="-march=x86-64 -mtune=nocona -O2 -pipe" CXXFLAGS="-march=x86-64 -mtune=nocona -O2 -pipe"
some testing is still required. i would like to put a modified version of pacman to testing right after it has moved to current. when everything is ok we would ask the pacman devs to change it to the default makepkg.conf.
please discuss.
Andy
(for i686 are also some speedups possible but that's not my task)
_______________________________________________ arch-dev-public mailing list arch-dev-public@archlinux.org http://archlinux.org/mailman/listinfo/arch-dev-public
no opinions? fine to everybody? Andy
On 4/3/07, Andreas Radke <a.radke@arcor.de> wrote:
Am Sat, 31 Mar 2007 12:31:20 +0200 schrieb Andreas Radke <a.radke@arcor.de>:
http://bbs.archlinux.org/viewtopic.php?id=27139
after some discussions in this thread we want to change our default compiler flags. we want to make use of the SSE3 extensions most x86_64 cpus have.
to not break backward compatibility for those few early cpus that lack SSE3 extensions we want to do it with -mtune. this is how we want to set it for the future:
CFLAGS="-march=x86-64 -mtune=nocona -O2 -pipe" CXXFLAGS="-march=x86-64 -mtune=nocona -O2 -pipe"
some testing is still required. i would like to put a modified version of pacman to testing right after it has moved to current. when everything is ok we would ask the pacman devs to change it to the default makepkg.conf.
please discuss.
Andy
(for i686 are also some speedups possible but that's not my task)
_______________________________________________ arch-dev-public mailing list arch-dev-public@archlinux.org http://archlinux.org/mailman/listinfo/arch-dev-public
no opinions? fine to everybody?
I don't know the details, so I assumed you looked into it all. Just in case: what 64bit processors does this "leave in the dust". Dropping support for some processors is not a huge problem (the age old Via C3 + Arch problem), but i think it might be important to put a blurb somewhere saying "If you have an XYZ processor, you need to use the arch i686".
Am Tue, 3 Apr 2007 16:40:20 -0500 schrieb "Aaron Griffin" <aaronmgriffin@gmail.com>:
to not break backward compatibility for those few early cpus that lack SSE3 extensions we want to do it with -mtune. this is how we want to set it for the future:
CFLAGS="-march=x86-64 -mtune=nocona -O2 -pipe" CXXFLAGS="-march=x86-64 -mtune=nocona -O2 -pipe"
I don't know the details, so I assumed you looked into it all. Just in case: what 64bit processors does this "leave in the dust".
Dropping support for some processors is not a huge problem (the age old Via C3 + Arch problem), but i think it might be important to put a blurb somewhere saying "If you have an XYZ processor, you need to use the arch i686".
i don't want to drop support for any early x86_64 cpu. that's why i want to use "mtune". code will be optimized for SSE3 capable cpus but will still run on non SSE3 capable processors. that's the difference mtune to march. i686 had something similar prepared in the old makepkg.conf i don't expect a big gain at all but in certain multimedia apps it can speedup things a lot. so why not make use of the additional registers? apps *might* run a little bit slower if they cannot make use of the additional flags and will it probably raise the pkg size a bit. but it should be still worth it. Andy
2007/4/4, Andreas Radke <a.radke@arcor.de>:
Am Tue, 3 Apr 2007 16:40:20 -0500 schrieb "Aaron Griffin" <aaronmgriffin@gmail.com>:
to not break backward compatibility for those few early cpus that lack SSE3 extensions we want to do it with -mtune. this is how we want to set it for the future:
CFLAGS="-march=x86-64 -mtune=nocona -O2 -pipe" CXXFLAGS="-march=x86-64 -mtune=nocona -O2 -pipe"
I don't know the details, so I assumed you looked into it all. Just in case: what 64bit processors does this "leave in the dust".
Dropping support for some processors is not a huge problem (the age old Via C3 + Arch problem), but i think it might be important to put a blurb somewhere saying "If you have an XYZ processor, you need to use the arch i686".
i don't want to drop support for any early x86_64 cpu.
that's why i want to use "mtune". code will be optimized for SSE3 capable cpus but will still run on non SSE3 capable processors. that's the difference mtune to march.
i686 had something similar prepared in the old makepkg.conf
i don't expect a big gain at all but in certain multimedia apps it can speedup things a lot. so why not make use of the additional registers? apps *might* run a little bit slower if they cannot make use of the additional flags and will it probably raise the pkg size a bit. but it should be still worth it.
I don't mind mtune (I've read forum thread). -- Roman Kyrylych (Роман Кирилич)
Roman Kyrylych wrote:
2007/4/4, Andreas Radke <a.radke@arcor.de>:
Am Tue, 3 Apr 2007 16:40:20 -0500 schrieb "Aaron Griffin" <aaronmgriffin@gmail.com>:
to not break backward compatibility for those few early cpus that lack SSE3 extensions we want to do it with -mtune. this is how we want to set it for the future:
CFLAGS="-march=x86-64 -mtune=nocona -O2 -pipe" CXXFLAGS="-march=x86-64 -mtune=nocona -O2 -pipe"
I don't know the details, so I assumed you looked into it all. Just in case: what 64bit processors does this "leave in the dust".
Dropping support for some processors is not a huge problem (the age old Via C3 + Arch problem), but i think it might be important to put a blurb somewhere saying "If you have an XYZ processor, you need to use the arch i686".
i don't want to drop support for any early x86_64 cpu.
that's why i want to use "mtune". code will be optimized for SSE3 capable cpus but will still run on non SSE3 capable processors. that's the difference mtune to march.
i686 had something similar prepared in the old makepkg.conf
i don't expect a big gain at all but in certain multimedia apps it can speedup things a lot. so why not make use of the additional registers? apps *might* run a little bit slower if they cannot make use of the additional flags and will it probably raise the pkg size a bit. but it should be still worth it.
I don't mind mtune (I've read forum thread).
I don't mind mtune either, as long as I (and others with similar hardware - non SSE3 ) don't take any hit from the change . Varun
http://bbs.archlinux.org/viewtopic.php?pid=243370#p243370 "-mtune=cpu-type Tune to cpu-type everything applicable about the generated code, except for the ABI and the set of available instructions." can somebody explain that a bit more? so mtune=nocona would not enable SSE3 instructions like i expected? Andy
Andreas Radke wrote:
http://bbs.archlinux.org/viewtopic.php?pid=243370#p243370
"-mtune=cpu-type Tune to cpu-type everything applicable about the generated code, except for the ABI and the set of available instructions."
can somebody explain that a bit more? so mtune=nocona would not enable SSE3 instructions like i expected?
Andy
What -mtune will do is to optimize runtime code to run better in a specific flavor of -march. Meaning, that it will use generic x86_64 instruction set with no SSE3 enabled but more extensively use advantages and work around disadvantages in yourr CPU variant. Such as multi-scalarity and things. -mtune normally doesn't optimize enough to notice any difference, if I were you I wouldn't go as far as to rebuild most of the repo just for the sake of a highly questionable speedup. Generally the -m<instruction set> or -m<arch specifics> give more optimization because they also will go and use extra instructions. Then again, they make the variety of possible CPUs smaller. :) Cheers, -L
participants (5)
-
Aaron Griffin
-
Alexander Baldeck
-
Andreas Radke
-
Roman Kyrylych
-
Varun Acharya