This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: libmvec in gcc to have vector math in fortran
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: Thomas Koenig <tkoenig at netcologne dot de>, Florian Weimer <fw at deneb dot enyo dot de>, Jakub Jelinek <jakub at redhat dot com>, szabolcs dot nagy at arm dot com, Janne Blomqvist <blomqvist dot janne at gmail dot com>, nd at arm dot com, GCC Development <gcc at gcc dot gnu dot org>, "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, sellcey at cavium dot com
- Date: Mon, 18 Jun 2018 11:34:02 +0200
- Subject: Re: libmvec in gcc to have vector math in fortran
- References: <6a8d496b-d830-5eb2-eba3-c2e452d06493@arm.com> <CAO9iq9FvH9Mbmec+tDO5_31vaKiu3p=WGhAXuFFUq8EJEeiQ-g@mail.gmail.com> <80c395e1-9de5-1d9c-35b6-1ccfdfa6a9e5@arm.com> <20180410102954.GB8577@tucnak> <CAFiYyc36_0n2Wn4huhAQO3C+J_ohJhUZqcE2+6m+tkU3m6LvoQ@mail.gmail.com> <20180410130655.GD8577@tucnak> <CAFiYyc361TAA3Fos=hfY-C11KhhF-gU4qXZd49TfJNXFevRU4g@mail.gmail.com> <877en01nvw.fsf@mid.deneb.enyo.de> <CAFiYyc1rnP6muEreKuUXc8EKPk+Fc7nTNr0mFO7cnGQFZy4svw@mail.gmail.com> <8736xo1kon.fsf@mid.deneb.enyo.de> <CAFiYyc2deefNfFDBqid6_n8V=J75MUUV8TqgZTJ+RUPjsG+Y5Q@mail.gmail.com> <b5c7a64d-1bbe-8afc-1ef0-d73565b5d377@netcologne.de> <alpine.DEB.2.20.1806152058060.27276@digraph.polyomino.org.uk>
On Fri, Jun 15, 2018 at 10:59 PM Joseph Myers <joseph@codesourcery.com> wrote:
>
> On Fri, 15 Jun 2018, Thomas Koenig wrote:
>
> > Hi Richard,
> >
> > > First and foremost we need a syntax that actually works for the
> > > Fortran frontend and a way to automatically include this special
> > > header / module.
> >
> > I can imagine parsing the relevant headers while compiling gfortran
> > and generating C code from it, which could then be #included in the
> > compiler source code. It should be possible to extend mathbuiltins.def
> > that way.
>
> The libmvec functions present depend on the multilib (for example, glibc
> only currently supports them for x86_64, not for 32-bit x86). Given this
> multilib dependence, parsing the glibc headers when building the compiler
> itself is probably not a sensible option.
I'm thinking of sth like the C stdc-predef.h header which is always included
by the compiler. So it needs to be sth parseable by gfortran which means
it needs to be a module or sth equivalent to a fortran include file.
GCC supports -include on the command-line, gfortran does not and it
could also support sth like -use FOO to import module FOO. The rest could
be then done by specs processing (or similar to the stdc-predef.h via
a fortran specific target hook).
Richard.
>
> --
> Joseph S. Myers
> joseph@codesourcery.com