From: Vincent Lefevre <vincent+gcc@vinc17.org>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Jonathan Wakely <jwakely.gcc@gmail.com>,
gcc-help <gcc-help@gcc.gnu.org>,
unlvsur unlvsur <unlvsur@live.com>
Subject: Re: how to get -march=native's value?
Date: Mon, 27 Sep 2021 14:55:28 +0200 [thread overview]
Message-ID: <20210927125528.GA3789484@cventin.lip.ens-lyon.fr> (raw)
In-Reply-To: <20210917175325.GS1583@gate.crashing.org>
On 2021-09-17 12:53:25 -0500, Segher Boessenkool wrote:
> For x86 -march=something is the same as -march=native, _if_ the compiler
> knows about your CPU.
It isn't:
cventin:~> diff -u <(gcc -Q --help=target --help=params -march=haswell) \
<(gcc -Q --help=target --help=params -march=native)
--- /proc/self/fd/11 2021-09-27 14:53:27.003263155 +0200
+++ /proc/self/fd/14 2021-09-27 14:53:27.003263155 +0200
@@ -9,11 +9,11 @@
-m8bit-idiv [disabled]
-m96bit-long-double [disabled]
-mabi= sysv
- -mabm [disabled]
+ -mabm [enabled]
-maccumulate-outgoing-args [disabled]
-maddress-mode= long
-madx [disabled]
- -maes [disabled]
+ -maes [enabled]
-malign-data= compat
-malign-double [disabled]
-malign-functions= 0
@@ -304,8 +304,8 @@
--param=jump-table-max-growth-ratio-for-size= 300
--param=jump-table-max-growth-ratio-for-speed= 800
--param=l1-cache-line-size= 64
- --param=l1-cache-size= 64
- --param=l2-cache-size= 512
+ --param=l1-cache-size= 32
+ --param=l2-cache-size= 15360
--param=large-function-growth= 100
--param=large-function-insns= 2700
--param=large-stack-frame-growth= 1000
I don't understand "_if_ the compiler knows about your CPU": if the
compiler knows about the CPU, it should select more accurate options
(as shown above, where abm and aes get enabled), shouldn't it?
--
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
next prev parent reply other threads:[~2021-09-27 12:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-07 7:02 unlvsur unlvsur
2021-09-07 7:56 ` Jonathan Wakely
2021-09-17 2:46 ` NightStrike
2021-09-17 8:29 ` Xi Ruoyao
2021-09-17 10:26 ` Jonathan Wakely
2021-09-17 10:38 ` Jonathan Wakely
2021-09-17 17:53 ` Segher Boessenkool
2021-09-27 12:55 ` Vincent Lefevre [this message]
2021-09-27 17:13 ` Segher Boessenkool
2021-09-27 18:14 ` L A Walsh
2021-09-27 18:25 ` Jonathan Wakely
2021-09-27 20:26 ` Segher Boessenkool
2021-09-27 20:30 ` NightStrike
2021-09-27 18:26 ` Florian Weimer
2021-09-07 7:59 ` Hongtao Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210927125528.GA3789484@cventin.lip.ens-lyon.fr \
--to=vincent+gcc@vinc17.org \
--cc=gcc-help@gcc.gnu.org \
--cc=jwakely.gcc@gmail.com \
--cc=segher@kernel.crashing.org \
--cc=unlvsur@live.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).