This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: Question about building and using libmvec
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: sellcey at cavium dot com, Carlos O'Donell <carlos at redhat dot com>, libc-help <libc-help at sourceware dot org>
- Cc: nd at arm dot com
- Date: Tue, 13 Feb 2018 12:34:58 +0000
- Subject: Re: Question about building and using libmvec
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs dot Nagy at arm dot com;
- Nodisclaimer: True
- References: <1517433450.2638.9.camel@cavium.com> <20535e83-3b58-5a15-2147-8fbbcb3246c0@redhat.com> <14a87057-cd62-2534-a4ea-e3a81901e1f0@arm.com> <1518457494.14236.64.camel@cavium.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 12/02/18 17:44, Steve Ellcey wrote:
On Mon, 2018-02-12 at 12:51 +0000, Szabolcs Nagy wrote:
and we need gcc support (so simd attributes/omp pragmas are
enabled and if the vector function call convention is special
that should be implemented too).
Someone here has done some work on this, I need to take
a look at it and make sure I understand what it is doing.
Even without this change, there is some value due to vectorization.
I.e. a loop with a sqrt currently gets vectorized on aarch64 because
there is a builtin vectorized sqrt function and the ABI doesn't matter.
if the vectorized function can be inlined then the abi
does not matter, but if the definition is in glibc then
gcc has to generate a call to the right symbol and set
up the registers the right way for the call.
another gcc issue that would be nice to fix is to make all
this work in fortran: currently the list of simd functions
are described in c headers so it does not affect fortran.
(there is no command line option to enable vectorization
of a particular function)
Interesting, I wasn't aware of this.
there was some discussion here:
https://gcc.gnu.org/ml/gcc/2017-11/msg00012.html