This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, VECTOR ABI] Add __attribute__((__simd__)) to GCC.


On Wed, 14 Oct 2015, Kirill Yukhin wrote:

> Is it ok for trunk?

This patch has no documentation.  Documentation for new attributes must be 
added to extend.texi.

> Enables creation of one or more versions that can process multiple 
> arguments using SIMD instructions from a single invocation from a SIMD 
> loop. It is ultimately an alias to `omp declare simdâ pragma, available 
> w/o additional compiler switches. It is prohibited to use the attribute 
> along with Cilk Plusâs `vectorâ attribute. If the attribute is specified 
> and `pragma omp declare simdâ presents on a decl, then the attribute is 
> ignored.

This is missing the key information that it's not just about *creation* of 
the versions, it's about (in the case of an external declaration) 
*assuming* such versions were created in another translation unit.  And 
you should have a link to the external ABI documents specifying for each 
architecture for which this involves such an assumption exactly what 
versions may be assumed to be present - this is what's required to be able 
to use the attribute in headers for a library and know that future GCC 
versions won't reinterpret the attribute as implying some versions for 
future ISA extensions are also present.

I wonder whether the syntax for this attribute should allow optional 
arguments to describe what versions are present, but maybe that can be 
deferred until e.g. you want a way in future for a library to specify it 
has an AVX1024 version of a function as well as the baseline ABI set of 
versions.

-- 
Joseph S. Myers
joseph@codesourcery.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]