Re: [PATCH, OpenACC] Make reduction arguments addressable

2016-06-10 Thread Thomas Schwinge
Hi! I'd still have preferred if that patch described (adding source code comments) why that special handling is required, but oh well... On Fri, 3 Jun 2016 15:13:40 +0800, Chung-Lin Tang wrote: > Tested again with no regressions. Your gomp-4_0-branch commit of this patch, r237210, forgot to cl

Re: [PATCH, OpenACC] Make reduction arguments addressable

2016-06-03 Thread Jakub Jelinek
On Fri, Jun 03, 2016 at 03:13:40PM +0800, Chung-Lin Tang wrote: > On 2016/6/2 10:00 PM, Jakub Jelinek wrote: > > Wouldn't it be better to pass either a bool openacc_async flag, or > > whole clauses, down to gfc_trans_omp_reduction_list and handle it there > > instead of walking the list after the f

Re: [PATCH, OpenACC] Make reduction arguments addressable

2016-06-03 Thread Chung-Lin Tang
On 2016/6/2 10:00 PM, Jakub Jelinek wrote: > Wouldn't it be better to pass either a bool openacc_async flag, or > whole clauses, down to gfc_trans_omp_reduction_list and handle it there > instead of walking the list after the fact? You mean this style? (patch attached) Tested again with no regress

Re: [PATCH, OpenACC] Make reduction arguments addressable

2016-06-02 Thread Jakub Jelinek
On Thu, Jun 02, 2016 at 09:55:05PM +0800, Chung-Lin Tang wrote: > fortran/ > * trans-openmp.c (gfc_trans_omp_clauses): Mark OpenACC reduction > arguments as addressable when async clause exists. Wouldn't it be better to pass either a bool openacc_async flag, or whole clauses, dow

Re: [PATCH, OpenACC] Make reduction arguments addressable

2016-06-02 Thread Chung-Lin Tang
On 2016/6/1 09:38 PM, Jakub Jelinek wrote: >> construct_clauses.lists[OMP_LIST_REDUCTION] = NULL; >> >oacc_clauses = gfc_trans_omp_clauses (&block, &construct_clauses, >> >code->loc); >> > + for (tree c = oacc_clauses; c; c = OMP_CLAUSE_CHAI

Re: [PATCH, OpenACC] Make reduction arguments addressable

2016-06-01 Thread Chung-Lin Tang
On 2016/5/31 05:51 PM, Chung-Lin Tang wrote: > On 2016/5/31 3:28 PM, Thomas Schwinge wrote: >> > Hi! >> > >> > On Mon, 30 May 2016 18:53:41 +0200, Jakub Jelinek wrote: >>> >> On Mon, May 30, 2016 at 10:38:59PM +0800, Chung-Lin Tang wrote: >>> Hi, a previous patch of Cesar's has made the midd

Re: [PATCH, OpenACC] Make reduction arguments addressable

2016-06-01 Thread Jakub Jelinek
On Wed, Jun 01, 2016 at 09:32:26PM +0800, Chung-Lin Tang wrote: > 2016-06-01 Chung-Lin Tang > > c/ > * c-typeck.c (c_finish_omp_clauses): Mark OpenACC reduction > arguments as addressable when async clause exists. > > cp/ > * semantics.c (finish_omp_clauses): Mark

Re: [PATCH, OpenACC] Make reduction arguments addressable

2016-05-31 Thread Chung-Lin Tang
kly send this follow-up patch, so glossed over XFAILing. > For reference, here is a test case, a reduced C version of > libgomp/testsuite/libgomp.oacc-c++/template-reduction.C. This test case > works (without Chung-Lin's "[PATCH, OpenACC] Make reduction arguments > addressable&q

Re: [PATCH, OpenACC] Make reduction arguments addressable

2016-05-31 Thread Thomas Schwinge
lways send email about such known regressions, and XFAIL them with your commit -- that would have saved me an hour yesterday, when I bisected recent changes to figure out why that test suddenly fails.) For reference, here is a test case, a reduced C version of libgomp/testsuite/libgomp.oacc-c+

Re: [PATCH, OpenACC] Make reduction arguments addressable

2016-05-30 Thread Jakub Jelinek
On Mon, May 30, 2016 at 10:38:59PM +0800, Chung-Lin Tang wrote: > Hi, a previous patch of Cesar's has made the middle-end omp-lowering > automatically create and insert a tofrom (i.e. present_or_copy) map for > parallel reductions. This allowed the user to not need explicit > clauses to copy out t

[PATCH, OpenACC] Make reduction arguments addressable

2016-05-30 Thread Chung-Lin Tang
Hi, a previous patch of Cesar's has made the middle-end omp-lowering automatically create and insert a tofrom (i.e. present_or_copy) map for parallel reductions. This allowed the user to not need explicit clauses to copy out the reduction result, but because reduction arguments are not marked addr