This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp4.1] Support #pragma omp target {enter,exit} data
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Ilya Verbin <iverbin at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Kirill Yukhin <kirill dot yukhin at gmail dot com>
- Date: Thu, 30 Jul 2015 23:07:48 +0200
- Subject: Re: [gomp4.1] Support #pragma omp target {enter,exit} data
- Authentication-results: sourceware.org; auth=none
- References: <20150630154201 dot GB27446 at msticlxl57 dot ims dot intel dot com> <20150630161044 dot GM10247 at tucnak dot redhat dot com> <20150701210658 dot GA51887 at msticlxl57 dot ims dot intel dot com> <20150706153425 dot GA52133 at msticlxl57 dot ims dot intel dot com> <20150706172509 dot GY10247 at tucnak dot redhat dot com> <20150706184530 dot GB52133 at msticlxl57 dot ims dot intel dot com> <20150706204210 dot GB10247 at tucnak dot redhat dot com> <20150729190652 dot GA44830 at msticlxl57 dot ims dot intel dot com> <20150730081259 dot GM1780 at tucnak dot redhat dot com> <20150730194433 dot GB22099 at msticlxl57 dot ims dot intel dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Jul 30, 2015 at 10:44:33PM +0300, Ilya Verbin wrote:
> libgomp/
> * libgomp.h (enum gomp_map_vars_kind): New.
> (gomp_map_vars): Change type of the argument from bool to enum
> gomp_map_vars_kind.
> * oacc-mem.c (acc_map_data, present_create_copy,
> gomp_acc_insert_pointer): Pass GOMP_MAP_VARS_OPENACC instead of false to
> gomp_map_vars.
> * oacc-parallel.c (GOACC_parallel, GOACC_data_start): Likewise.
> * target.c (gomp_map_vars_existing): Fix target address for 'always to'
> array sections.
> (gomp_map_vars): Change type of the argument from bool to enum
> gomp_map_vars_kind, fixup its usage. Set tgt->refcount to 0 if called
> from GOMP_target_enter_exit_data. Free tgt if called from
> GOMP_target_enter_exit_data and nothing has been mapped.
> (gomp_unmap_vars): Decrement k->refcount when it is 1 and
> k->async_refcount is 0.
> (gomp_offload_image_to_device): Set tgt's refcount to infinity.
> (GOMP_target, GOMP_target_41): Pass GOMP_MAP_VARS_TARGET instead of true
> to gomp_map_vars.
> (gomp_target_data_fallback, GOMP_target_data, GOMP_target_data_41): Pass
> GOMP_MAP_VARS_DATA instead of false to gomp_map_vars.
> (gomp_exit_data): New static function.
> (GOMP_target_enter_exit_data): Support mapping/unmapping.
> * testsuite/libgomp.c/target-11.c: Extend for testing 'always to' array
> sections.
> * testsuite/libgomp.c/target-20.c: New test.
Ok, thanks.
Jakub