This is the mail archive of the
mailing list for the GCC project.
Re: [gomp4] Some progress on #pragma omp simd
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: "Iyer, Balaji V" <balaji dot v dot iyer at intel dot com>, Richard Henderson <rth at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 24 Apr 2013 19:08:20 -0500
- Subject: Re: [gomp4] Some progress on #pragma omp simd
- References: <20130419132957 dot GE12880 at tucnak dot redhat dot com> <5175B40F dot 7040709 at redhat dot com> <20130423135455 dot GN12880 at tucnak dot redhat dot com> <BF230D13CA30DD48930C31D40993300032A37760 at FMSMSX101 dot amr dot corp dot intel dot com> <20130424060117 dot GV12880 at tucnak dot redhat dot com>
On 04/24/13 01:01, Jakub Jelinek wrote:
The documentation doesn't suggest that. Anyway, so
should be equivalent to
#pragma omp simd
wrt. inter-iteration dependencies, and
#pragma simd vectorlength(a, b, c)
#pragma omp simd safelen(max (a, b, c))
? If so, then the FE could emit OMP_SIMD for #pragma simd, and if
vectorlength is present, add OMP_CLAUSE_SAFELEN with the maximum of the
values in all vectorlength clauses, and keep the vectorlength clauses around
too as CILK_CLAUSE_VECTORLENGTH as hints to the vectorizer?
I can make these changes to the Cilk Plus code.
Also, Aldy said that #pragma simd loops allow != condition, how do you
compute number of iterations in that case if the increment isn't constant?
As conditional depending on whether increment is positive or negative?
!= condition isn't allowed in OpenMP, so there it is always obvious which
direction it should iterate, and the expansion code will assume if it sees
NE_EXPR that it is just folded border test (comparison with maximum or
Perhaps it is an oversight in the documentation, because icc disallows
both == and !=. Disallowing != makes it a lot easier :).