[openacc] reference-typed data mappings

Cesar Philippidis cesar_philippidis@mentor.com
Tue Feb 9 17:05:00 GMT 2016


On 02/09/2016 07:00 AM, Cesar Philippidis wrote:
> On 02/01/2016 09:57 AM, Cesar Philippidis wrote:
> 
>> > This patch fixes a couple of bugs preventing c++ reference-typed
>> > variables from working in openacc data clauses. These fixes include:
>> > 
>> >  * Teach the gimplifier to filter out pointer data mappings for
>> >    OACC_DATA, OACC_ENTER_DATA, OACC_EXIT_DATA and OACC_UPDATE regions.
>> >    Along with using a firsptrivate mapping for the array base pointers
>> >    in OACC_DATA, OACC_PARALLEL and OACC_KERNELS regions.
>> > 
>> >  * Make the data mapping errors emitted by the c and c++ front ends
>> >    more consistent with openacc by reporting data mapping errors, not
>> >    omp-specific map errors.
>> > 
>> >  * Add some light checking for duplicate reference mappings in c++. The
>> >    c++ FE still fails to detect duplicate component refs, but that's not
>> >    working in openacc at the moment, anyway.
>> > 
>> > Jakub, the latter issue also affects openmp. I've added a simple openmp
>> > test case, but it could probably be more extensive. Can you add more
>> > test coverage or tell me what should be included?
> While working on a different reduction problem, I noticed that both the
> c and c++ front end's are treating reductions as generic data clauses.
> That means, parallel reductions of the form
> 
>   #pragma acc copy(foo) reduction(+:foo)
> 
> would get treated as an error. This patch fixes that, in addition to the
> changes listed above.
> 
> Is this patch ok for trunk?

> 	libgomp/
> 	* testsuite/libgomp.c++/non-scalar-data.C: New test.

I copied the wrong test here. It should be testing omp target, not acc
*. This patch updates that test case.

Cesar

-------------- next part --------------
A non-text attachment was scrubbed...
Name: c-cxx-reference-reductions-20160209.diff
Type: text/x-patch
Size: 87217 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160209/dda2286c/attachment.bin>


More information about the Gcc-patches mailing list