This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/N] x86_64 vectorization support: vectorized math functions addition to Glibc
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Rich Felker <dalias at libc dot org>
- Cc: "Carlos O'Donell" <carlos at redhat dot com>, Andi Kleen <andi at firstfloor dot org>, Matthew Fortune <Matthew dot Fortune at imgtec dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, Andrew Senkevich <andrew dot n dot senkevich at gmail dot com>, libc-alpha <libc-alpha at sourceware dot org>, "igor dot zamyatin at intel dot com" <igor dot zamyatin at intel dot com>, "Melik-Adamyan, Areg" <areg dot melik-adamyan at intel dot com>
- Date: Fri, 12 Sep 2014 22:32:54 +0200
- Subject: Re: [PATCH 1/N] x86_64 vectorization support: vectorized math functions addition to Glibc
- Authentication-results: sourceware.org; auth=none
- References: <CAMXFM3t=ppndDUBzHzSus7xyuF5hTaLFZ5b273jD39NtddSvsw at mail dot gmail dot com> <Pine dot LNX dot 4 dot 64 dot 1409101549490 dot 12853 at digraph dot polyomino dot org dot uk> <6D39441BF12EF246A7ABCE6654B0235320F09D65 at LEMAIL01 dot le dot imgtec dot org> <20140911210246 dot GN23797 at brightrain dot aerifal dot cx> <87a9655rnu dot fsf at tassilo dot jf dot intel dot com> <541346DC dot 4090906 at redhat dot com> <54134754 dot 5080402 at redhat dot com> <20140912195619 dot GS23797 at brightrain dot aerifal dot cx>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Sep 12, 2014 at 03:56:19PM -0400, Rich Felker wrote:
> On Fri, Sep 12, 2014 at 03:19:48PM -0400, Carlos O'Donell wrote:
> > On 09/12/2014 03:17 PM, Carlos O'Donell wrote:
> > > On 09/12/2014 01:33 AM, Andi Kleen wrote:
> > >> Rich Felker <dalias@libc.org> writes:
> > >>>
> > >>> This really seems like something the compiler should be doing --
> > >>> translating parallelizable calls to the standard math functions into
> > >>> calls to special simd versions (
> > >>
> > >> Of course gcc already supports that. Even in two different flavours.
> > >>
> > >> Not sure why the patch doesn't implement one of those ABIs though.
> > >
> > > Please note that AFAIK gcc doesn't implement the ABI as documented
> > > by Intel, but a variant, and my expectation is that we should *absolutely*
> > > be targetting the gcc version of the Intel ABI otherwise what's the point?
> >
> > I see Jakub already responded that there is a 3rd ABI :}
>
> I don't see any point in targeting ABIs that don't have the function
> names in a reserved namespace, since the compiler cannot automatically
> make such transformations using non-reserved namespace.
??? The names are in reserved namespace, e.g. for
#pragma omp declare simd
double foo (double x, double y, double z) { return x + y + z; }
on i?86/x86_64 the mangled names are
_ZGVbN2vvv_foo
_ZGVbM2vvv_foo
_ZGVcN4vvv_foo
_ZGVcM4vvv_foo
_ZGVdN4vvv_foo
_ZGVdM4vvv_foo
Jakub