Re: [patch,openacc] use firstprivate pointers for subarrays in c and c++

2016-06-01 Thread Jakub Jelinek
On Wed, Jun 01, 2016 at 10:33:32AM -0700, Cesar Philippidis wrote: > >>switch (OMP_CLAUSE_MAP_KIND (c)) > >> { > >> case GOMP_MAP_ALLOC: > > | case GOMP_MAP_TO: > > | case GOMP_MAP_FROM: > > | case GOMP_MAP_TOFROM: > > | case GOMP_MAP_ALWAYS_TO: > > | case GOMP_MAP

Re: [patch,openacc] use firstprivate pointers for subarrays in c and c++

2016-06-01 Thread Cesar Philippidis
On 05/25/2016 09:33 AM, Thomas Schwinge wrote: >> --- gcc/c/c-parser.c >> +++ gcc/c/c-parser.c >> @@ -13602,6 +13602,7 @@ c_parser_oacc_declare (c_parser *parser) >> >>switch (OMP_CLAUSE_MAP_KIND (t)) >> { >> +case GOMP_MAP_FIRSTPRIVATE_POINTER: >> case GOMP_MAP_FORCE_ALLOC

Re: [patch,openacc] use firstprivate pointers for subarrays in c and c++

2016-05-25 Thread Thomas Schwinge
Hi! A few more comments on the patch, as committed in r236678, also for Chung-Lin and Tom. The ChangeLos are missing references to GCC PRs, so these now should be updated manually. For example, your changes relate to PR70688 "bogus OpenACC data clause errors involving reductions", and some of th

Re: [patch,openacc] use firstprivate pointers for subarrays in c and c++

2016-05-24 Thread Jakub Jelinek
On Tue, May 24, 2016 at 12:16:35PM -0700, Cesar Philippidis wrote: > --- a/gcc/c/c-typeck.c > +++ b/gcc/c/c-typeck.c > @@ -11939,8 +11939,7 @@ c_finish_omp_cancellation_point (location_t loc, tree > clauses) > > static tree > handle_omp_array_sections_1 (tree c, tree t, vec &types, > -

Re: [patch,openacc] use firstprivate pointers for subarrays in c and c++

2016-05-24 Thread Cesar Philippidis
On 05/23/2016 11:09 PM, Jakub Jelinek wrote: > On Mon, May 23, 2016 at 07:31:53PM -0700, Cesar Philippidis wrote: >> @@ -12559,7 +12560,7 @@ c_finish_omp_clauses (tree clauses, enum >> c_omp_region_type ort) >>t = OMP_CLAUSE_DECL (c); >>if (TREE_CODE (t) == TREE_LIST) >> {

Re: [patch,openacc] use firstprivate pointers for subarrays in c and c++

2016-05-23 Thread Jakub Jelinek
On Mon, May 23, 2016 at 07:31:53PM -0700, Cesar Philippidis wrote: > @@ -12559,7 +12560,7 @@ c_finish_omp_clauses (tree clauses, enum > c_omp_region_type ort) > t = OMP_CLAUSE_DECL (c); > if (TREE_CODE (t) == TREE_LIST) > { > - if (handle_omp_array_sections (c,

Re: [patch,openacc] use firstprivate pointers for subarrays in c and c++

2016-05-23 Thread Cesar Philippidis
On 05/20/2016 02:42 AM, Jakub Jelinek wrote: > On Tue, May 10, 2016 at 01:29:50PM -0700, Cesar Philippidis wrote: >> @@ -5796,12 +5796,14 @@ tree >> finish_omp_clauses (tree clauses, enum c_omp_region_type ort) >> { >>bitmap_head generic_head, firstprivate_head, lastprivate_head; >> - bitma

Re: [patch,openacc] use firstprivate pointers for subarrays in c and c++

2016-05-20 Thread Jakub Jelinek
On Tue, May 10, 2016 at 01:29:50PM -0700, Cesar Philippidis wrote: > @@ -12542,7 +12543,7 @@ c_finish_omp_clauses (tree clauses, enum > c_omp_region_type ort) > t = OMP_CLAUSE_DECL (c); > if (TREE_CODE (t) == TREE_LIST) > { > - if (handle_omp_array_sections (c,

Re: [ping][patch,openacc] use firstprivate pointers for subarrays in c and c++

2016-05-19 Thread Cesar Philippidis
Ping. Cesar On 05/10/2016 01:29 PM, Cesar Philippidis wrote: > Pointers are special in OpenACC. Depending on the context, they can > either be treated as a "scalar" or as special firstprivate pointer. This > is in contrast to OpenMP target pointers, which are always treated as > firstprivate poin

[patch,openacc] use firstprivate pointers for subarrays in c and c++

2016-05-10 Thread Cesar Philippidis
Pointers are special in OpenACC. Depending on the context, they can either be treated as a "scalar" or as special firstprivate pointer. This is in contrast to OpenMP target pointers, which are always treated as firstprivate pointers if I'm not mistaken. The difference between a firstprivate scalar