public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/66593] New: driver-i386.c: -mtune=native unavailable with non-bootstrapped build of libgccjit with gcc < 5
@ 2015-06-19 1:23 dmalcolm at gcc dot gnu.org
2015-06-19 1:52 ` [Bug target/66593] " dmalcolm at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2015-06-19 1:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66593
Bug ID: 66593
Summary: driver-i386.c: -mtune=native unavailable with
non-bootstrapped build of libgccjit with gcc < 5
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: driver
Assignee: unassigned at gcc dot gnu.org
Reporter: dmalcolm at gcc dot gnu.org
CC: uros at gcc dot gnu.org
Target Milestone: ---
Host: x86_64-unknown-linux-gnu
Target: x86_64-unknown-linux-gnu
Build: x86_64-unknown-linux-gnu
Currently libgccjit uses -mtune=generic; I'm working on enabling -mtune=native
for libgccjit.
However, on i386/x86_64 with a non-bootstrap build using gcc < 5,
host_detect_local_cpu does nothing.
This is due to:
commit b587c12551143c14f023860a1dbdf7316ae71f27
Author: uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri Oct 17 06:00:58 2014 +0000
* config/i386/cpuid.h (__cpuid): Remove definitions that handle %ebx
register in a special way.
(__cpuid_count): Ditto.
* config/i386/driver-i386.h: Protect with
"#if defined(__GNUC__) && (__GNUC__ >= 5 || !defined(__PIC__))".
(host_detect_local_cpu): Mention that GCC with non-fixed %ebx
is required to compile the function.
Uros said (in https://gcc.gnu.org/ml/gcc-patches/2014-10/msg01516.html):
> The only drawback would be that non-bootstrapped build with gcc < 5.0
> will ignore -march=native, but I think this should be acceptable."
Jakub said (in https://gcc.gnu.org/ml/gcc-patches/2014-10/msg01520.html):
> At least on Linux, driver-i386.c should not be built with PIC normally,
> so at least changing
> #if __GNUC__ >= 5
> to
> #if defined(__GNUC__) && (__GNUC__ >= 5 || !defined(__PIC__))
> would limit the -march=native change for non-bootstrapped compilers to
> Darwin only (or what other targets use PIC by default?).
The jit builds with PIC, and -mtune=native would be highly appropriate for
jitted-code; so this is a somewhat bigger deal.
Currently the instructions for building libgccjit recommend
--disable-bootstrap, so everyone following those on i386/x86_64 with gcc < 5 as
the system compiler is going to get a hobbled -mtune=native.
That said, the above code runs inside the driver, and libgccjit doesn't yet run
that part of the driver, so some extra work will be needed by me on top of this
before we can get it to do better than -mtune=generic.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug target/66593] driver-i386.c: -mtune=native unavailable with non-bootstrapped build of libgccjit with gcc < 5
2015-06-19 1:23 [Bug driver/66593] New: driver-i386.c: -mtune=native unavailable with non-bootstrapped build of libgccjit with gcc < 5 dmalcolm at gcc dot gnu.org
@ 2015-06-19 1:52 ` dmalcolm at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2015-06-19 1:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66593
--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
(In reply to David Malcolm from comment #0)
[...]
> That said, the above code runs inside the driver, and libgccjit doesn't yet
> run that part of the driver, so some extra work will be needed by me on top
> of this before we can get it to do better than -mtune=generic.
I filed bug 66594 against the "jit" component to track that.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-06-19 1:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-19 1:23 [Bug driver/66593] New: driver-i386.c: -mtune=native unavailable with non-bootstrapped build of libgccjit with gcc < 5 dmalcolm at gcc dot gnu.org
2015-06-19 1:52 ` [Bug target/66593] " dmalcolm at gcc dot gnu.org
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).