[gomp4] OpenACC async clause regressions (was: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data)

2015-10-22 Thread Thomas Schwinge
Hi! On Mon, 19 Oct 2015 18:24:35 +0200, I wrote: > Chung-Lin, would you please have a look at the following (on > gomp-4_0-branch)? Also, anyone else got any ideas off-hand? Ilya, Jakub, thanks for your comments! > On Tue, 23 Jun 2015 13:51:39 +0200, Jakub Jelinek wrote: > >

Re: OpenACC async clause regressions (was: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data)

2015-10-20 Thread Jakub Jelinek
On Mon, Oct 19, 2015 at 07:43:59PM +0300, Ilya Verbin wrote: > On Mon, Oct 19, 2015 at 18:24:35 +0200, Thomas Schwinge wrote: > > Chung-Lin, would you please have a look at the following (on > > gomp-4_0-branch)? Also, anyone else got any ideas off-hand? > > > > PASS:

OpenACC async clause regressions (was: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data)

2015-10-19 Thread Thomas Schwinge
Hi! Chung-Lin, would you please have a look at the following (on gomp-4_0-branch)? Also, anyone else got any ideas off-hand? On Tue, 23 Jun 2015 13:51:39 +0200, Jakub Jelinek wrote: > On Tue, Jun 23, 2015 at 02:40:43PM +0300, Ilya Verbin wrote: > > On Sat, Jun 20, 2015 at

Re: OpenACC async clause regressions (was: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data)

2015-10-19 Thread Ilya Verbin
On Mon, Oct 19, 2015 at 18:24:35 +0200, Thomas Schwinge wrote: > Chung-Lin, would you please have a look at the following (on > gomp-4_0-branch)? Also, anyone else got any ideas off-hand? > > PASS: libgomp.oacc-c/../libgomp.oacc-c-c++-common/data-2.c > -DACC_DEVICE_TYPE_nvidia=1

Re: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data

2015-10-13 Thread Ilya Verbin
On Mon, Jun 15, 2015 at 22:48:50 +0300, Ilya Verbin wrote: > @@ -950,50 +997,41 @@ GOMP_target (int device, void (*fn) (void *), const > void *unused, > ... > + devicep->run_func (devicep->target_id, fn_addr, (void *) > tgt_vars->tgt_start); If mapnum is 0, tgt_vars->tgt_start is

Re: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data

2015-10-13 Thread Jakub Jelinek
On Tue, Oct 13, 2015 at 05:48:11PM +0300, Ilya Verbin wrote: > On Mon, Jun 15, 2015 at 22:48:50 +0300, Ilya Verbin wrote: > > @@ -950,50 +997,41 @@ GOMP_target (int device, void (*fn) (void *), const > > void *unused, > > ... > > + devicep->run_func (devicep->target_id, fn_addr, (void *) > >

Re: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data

2015-06-24 Thread Jakub Jelinek
On Tue, Jun 23, 2015 at 02:40:43PM +0300, Ilya Verbin wrote: On Sat, Jun 20, 2015 at 00:35:14 +0300, Ilya Verbin wrote: Given that a mapped variable in 4.1 can have different kinds across nested data regions, we need to store map-type not only for each var, but also for each structured

Re: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data

2015-06-24 Thread Ilya Verbin
On Wed, Jun 24, 2015 at 13:39:03 +0200, Jakub Jelinek wrote: Thinking about this more, for always modifier this isn't really sufficient. Consider: void foo (int *p) { #pragma omp target data (alloc:p[0:32]) { #pragma omp target data (always, from:p[7:9]) { ... }

Re: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data

2015-06-24 Thread Jakub Jelinek
On Wed, Jun 24, 2015 at 11:11:12PM +0300, Ilya Verbin wrote: Indeed, here is the fix, make check-target-libgomp passed. libgomp/ * libgomp.h (struct target_var_desc): Add offset and length. * target.c (gomp_map_vars_existing): New argument tgt_var, fill it.

Re: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data

2015-06-23 Thread Jakub Jelinek
On Tue, Jun 23, 2015 at 05:54:48PM +0300, Ilya Verbin wrote: On Tue, Jun 23, 2015 at 13:51:39 +0200, Jakub Jelinek wrote: + /* Set dd on target to 0 for the further check. */ + #pragma omp target map(always to: dd) + { dd; } This reminds me that: if

Re: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data

2015-06-23 Thread Ilya Verbin
On Tue, Jun 23, 2015 at 13:51:39 +0200, Jakub Jelinek wrote: + /* Set dd on target to 0 for the further check. */ + #pragma omp target map(always to: dd) + { dd; } This reminds me that: if (ctx-region_type == ORT_TARGET !(n-value GOVD_SEEN)) remove =

Re: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data

2015-06-23 Thread Jakub Jelinek
On Tue, Jun 23, 2015 at 02:40:43PM +0300, Ilya Verbin wrote: On Sat, Jun 20, 2015 at 00:35:14 +0300, Ilya Verbin wrote: Given that a mapped variable in 4.1 can have different kinds across nested data regions, we need to store map-type not only for each var, but also for each structured

Re: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data

2015-06-23 Thread Ilya Verbin
On Sat, Jun 20, 2015 at 00:35:14 +0300, Ilya Verbin wrote: Given that a mapped variable in 4.1 can have different kinds across nested data regions, we need to store map-type not only for each var, but also for each structured mapping. Here is my WIP patch, is it sane? :) Attached testcase

Re: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data

2015-06-19 Thread Ilya Verbin
Given that a mapped variable in 4.1 can have different kinds across nested data regions, we need to store map-type not only for each var, but also for each structured mapping. Here is my WIP patch, is it sane? :) Attached testcase works OK on the device with non-shared memory. diff --git

Re: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data

2015-06-15 Thread Jakub Jelinek
On Mon, Jun 15, 2015 at 03:20:37PM +0300, Ilya Verbin wrote: This patch introduces new versions of GOMP_target{,_data,_update} for OpenMP 4.1 with unsigned short for map kinds, but without new async arguments yet. I think I'd prefer (for now) to suffix the functions with _41 instead of 1 (and

[gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data

2015-06-15 Thread Ilya Verbin
Hi, This patch introduces new versions of GOMP_target{,_data,_update} for OpenMP 4.1 with unsigned short for map kinds, but without new async arguments yet. make check-target-libgomp and bootstrap passed, ok for gomp-4_1-branch? gcc/ * builtin-types.def

Re: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data

2015-06-15 Thread Ilya Verbin
On Mon, Jun 15, 2015 at 15:06:09 +0200, Jakub Jelinek wrote: On Mon, Jun 15, 2015 at 03:20:37PM +0300, Ilya Verbin wrote: This patch introduces new versions of GOMP_target{,_data,_update} for OpenMP 4.1 with unsigned short for map kinds, but without new async arguments yet. I think I'd

Re: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data

2015-06-15 Thread Jakub Jelinek
On Mon, Jun 15, 2015 at 07:18:27PM +0300, Ilya Verbin wrote: On Mon, Jun 15, 2015 at 15:06:09 +0200, Jakub Jelinek wrote: On Mon, Jun 15, 2015 at 03:20:37PM +0300, Ilya Verbin wrote: This patch introduces new versions of GOMP_target{,_data,_update} for OpenMP 4.1 with unsigned short

Re: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data

2015-06-15 Thread Ilya Verbin
On Mon, Jun 15, 2015 at 18:25:28 +0200, Jakub Jelinek wrote: On Mon, Jun 15, 2015 at 07:18:27PM +0300, Ilya Verbin wrote: On Mon, Jun 15, 2015 at 15:06:09 +0200, Jakub Jelinek wrote: On Mon, Jun 15, 2015 at 03:20:37PM +0300, Ilya Verbin wrote: This patch introduces new versions of

Re: [gomp4.1] Add new versions of GOMP_target{,_data,_update} and GOMP_target_enter_exit_data

2015-06-15 Thread Jakub Jelinek
On Mon, Jun 15, 2015 at 10:48:50PM +0300, Ilya Verbin wrote: Here is the new patch. OK to commit? gcc/ * builtin-types.def (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR): New. (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR): Remove. * omp-builtins.def (BUILT_IN_GOMP_TARGET):