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: Florian Weimer <fw at deneb dot enyo dot de>
- Cc: 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: Fri, 15 Jun 2018 11:33:17 +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>
On Fri, Jun 15, 2018 at 11:08 AM Florian Weimer <fw@deneb.enyo.de> wrote:
>
> * Richard Biener:
>
> > That said, good to see some glibc folks jump in on this thread.
> > I'd like to see glibc provide a fortran intrinsic header advertising
> > the libmvec routines it has. We probably do need some gfortran
> > adjustments here but I think that glibc advertising is better than
> > hard-coding lists into GCC (like we do for some targets with
> > their -mveclibabi= option).
>
> The advantage of putting into GCC is that it will work irrespective of
> the installed glibc header version, so if we get this going:
>
> <https://sourceware.org/ml/libc-alpha/2018-05/msg00501.html>
>
> you could use libmvec along with really old glibcs (probably as far
> back as 2.12, maybe even older).
Well, ok - I obviously meant bundling the header with libmvec, not with
glibc (which currently is the same).
Putting it into GCC means that you have mismatches in both directions.
I was also considering to somehow auto-generate a header based
on what the C headers advertise at GCC install time.
[or put a C parser into the fortran frontend, eh...]
> But then we might into a different direction altogether.
>
> Another question is wheter the Fortran header can be generated by
> something like -fdump-ada-spec, so that we don't have to maintain it
> separately from the C header.
Sure, see above - I think that's possible and it doesn't have to be as
complicated as -fdump-ada-spec. Instead a simple script in your
favorite language will do the job.
First and foremost we need a syntax that actually works for the
Fortran frontend and a way to automatically include this special
header / module.
Richard.