This is the mail archive of the
mailing list for the GCC project.
Re: [RFC, VECTOR ABI] Allow __attribute__((vector)) in GCC by default.
- From: Jeff Law <law at redhat dot com>
- To: Joseph Myers <joseph at codesourcery dot com>, Kirill Yukhin <kirill dot yukhin at gmail dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, gcc at gcc dot gnu dot org, libc-alpha at sourceware dot org
- Date: Wed, 7 Oct 2015 11:09:04 -0600
- Subject: Re: [RFC, VECTOR ABI] Allow __attribute__((vector)) in GCC by default.
- Authentication-results: sourceware.org; auth=none
- References: <20151005130733 dot GB62312 at msticlxl57 dot ims dot intel dot com> <alpine dot DEB dot 2 dot 10 dot 1510051320120 dot 16355 at digraph dot polyomino dot org dot uk>
On 10/05/2015 07:24 AM, Joseph Myers wrote:
I'm not sure why this attribute isn't documented, but clearly that
should be fixed.
On Mon, 5 Oct 2015, Kirill Yukhin wrote:
To enable vectorization of loops w/ calls to math functions it is reasonable
to enable parsing of attribute vector for functions unconditionally and
change GlibC's header file not to use `omp declare simd', but use
I assume you mean __vector__, for namespace reasons. Obviously you need
appropriate GCC version conditionals in the headers to use the attribute
only when supported. In addition, (a) this attribute doesn't seem to be
documented in extend.texi, and you'll need to include documentation in
your GCC patch that makes this a generic extension rather than just part
of Cilkplus, and (b) you'll need to agree with the x86_64 ABI mailing list
an extension of the ABI document (as attached to
<https://sourceware.org/glibc/wiki/libmvec>) to cover this attribute, and
update the document there.
From the GCC side, I don't see a compelling reason to keep this
attribute conditional on Cilk+ support. One could very easily want to
use the math library's vector entry points independent of OpenMP or Cilk+.
I thought the ABI for this stuff was consistent across the
implementations (that was certainly the goal). So aside from an example
of how to use the attribute to get calls into the vector math library,
I'm not sure what's needed. Essentially the attribute is just another
way to ensure we exploit the vector library when possible.
It also seems to me that showing that example on the libmvec page would