This is the mail archive of the
mailing list for the GCC project.
Re: [C, C++, OpenMP] Add support for -fopenmp-simd
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Tobias Burnus <burnus at net-b dot de>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, Jason Merrill <jason at redhat dot com>, gcc patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 31 Oct 2013 17:40:56 +0100
- Subject: Re: [C, C++, OpenMP] Add support for -fopenmp-simd
- Authentication-results: sourceware.org; auth=none
- References: <526D8995 dot 8060203 at net-b dot de>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Sun, Oct 27, 2013 at 10:45:57PM +0100, Tobias Burnus wrote:
> The code is written such that when "-fopenmp" is used,
> -f(no-)openmp-simd has no effect. The following "simd" pragmas are
> listed in OpenMP 4.0 - and will all get translated into "#pragma omp
> simd", only, with -fopenmp-simd:
> #pragma omp simd
> #pragma omp for simd
> #pragma omp distribute simd
> #pragma omp distribute parallel for simd
> #pragma omp parallel for simd
> #pragma omp teams distribute simd
> #pragma omp target teams distribute simd
> #pragma omp teams distribute parallel for simd
> #pragma omp target teams distribute parallel for simd
> I did an all-language bootstrap, followed by regtesting on x86-64-gnu-linux.
> (I did a minor change before sending this patch and will have to repeat it.)
I think we should also parse
#pragma omp declare reduction
even for -fopenmp-simd, that is something that if not used in reduction
clauses will not do anything except diagnosing errors, and it may be used
in #pragma omp simd (and the combined constructs too).
Also, it would be nice if the testcases for this option included also
some clauses (both valid clauses for the simd itself and clauses valid
for the other combined constructs together with simd that they are parsed
but then thrown away).
Otherwise it looks good to me. Thanks for working on it.