This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: Patch to allow use of DECL_NAME in libmvec calls instead of DECL_ASSEMBER_NAME
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Steve Ellcey <sellcey at marvell dot com>, "joseph at codesourcery dot com" <joseph at codesourcery dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "richard dot sandiford at arm dot com" <richard dot sandiford at arm dot com>
- Date: Wed, 13 Mar 2019 13:06:17 +0100
- Subject: Re: RFC: Patch to allow use of DECL_NAME in libmvec calls instead of DECL_ASSEMBER_NAME
- References: <41abe64e531d6d590fd85d9917b62bf2f169d1d1.camel@marvell.com> <CAFiYyc2sFYQkoLUECzCECBb6L05LL6=Hux+D1w0pXYe=+K-jEQ@mail.gmail.com> <alpine.DEB.2.21.1903121412410.29995@digraph.polyomino.org.uk> <d7174634375c84bfdfe6fc40b07ec3f231a25c99.camel@marvell.com> <20190312234049.GW7611@tucnak> <CAFiYyc1CMMsQ8LwzeaE+JVgmEObK0Gbhw-P_U5AvsErFVzs8=g@mail.gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Mar 13, 2019 at 01:01:54PM +0100, Richard Biener wrote:
> On Wed, Mar 13, 2019 at 12:40 AM Jakub Jelinek <jakub@redhat.com> wrote:
> >
> > On Tue, Mar 12, 2019 at 11:21:26PM +0000, Steve Ellcey wrote:
> > > I like this idea. I have prototyped something, I created 'vector_asm'
> > > as an aarch64 attribute because I couldn't find where to put global
> > > attributes like __simd__. Does anyone know where these are listed?
> >
> > gcc/c-family/c-attribs.c
> >
> > Note, vector_asm seems like a bad name when the attribute is simd
> > or directive #pragma omp declare simd, it should be simd_asm instead.
> >
> > If we go this route, glibc headers would need to use it conditional on gcc
> > version though, because older gccs wouldn't support that attribute.
>
> And that fortran support patch would need yet another iteration.
>
> That said, I dislike it and I do not see why a solution in glibc needs to be
> inefficient either.
Yeah, an alias doesn't really cost much, and has the advantage that if in
the vector version you need at some point to differentiate between the
finite only vs. full implementations, you can just by tweaking libmvec
implementation, the callers will have proper calls depending on if they were
compiled with -Ofast or -O3 etc.
Jakub