This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug jit/66594] jitted code should use -mtune=native
- From: "dmalcolm at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 19 Jun 2015 17:15:11 +0000
- Subject: [Bug jit/66594] jitted code should use -mtune=native
- Auto-submitted: auto-generated
- References: <bug-66594-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66594
--- Comment #6 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
(In reply to ktkachov from comment #4)
> (In reply to David Malcolm from comment #2)
> > (In reply to Andrew Pinski from comment #1)
> > > This should be true on all targets which have -mcpu=native (or
> > > -march=native). Note x86 options are not always the same on x86 vs arm vs
> > > aarch64 vs ppc.
> >
> > Thanks.
> >
> > Is there a way to express
> > "give me the most specialized possible code for the current host"?
> > in a manner that's consistent across all supported hosts?
> > (e.g. in the "specs" language?)
> >
> > e.g. "-march=native -mcpu=native -mtune=native"
>
> A note that the meaning of march/mcpu/mtune may differ among targets.
> For arm and aarch64, for example, the preferred option is -mcpu, which is
> the combination of march+mtune
Perhaps we need a target macro that's something like:
TARGET_JIT_NATIVE_CODE_SPEC
or somesuch, defaulting to empty, but defining it per-arch to a spec-language
string containing the appropriate option(s) for that host/target? (assuming
host==target, which is currently the case for the jit).