[PATCH 2/6] [og9] OpenACC middle-end worker-partitioning support

2019-09-04 Thread Julian Brown
644 gcc/omp-sese.h diff --git a/gcc/ChangeLog.openacc b/gcc/ChangeLog.openacc index b1c627b394c..a2b2dcfcf26 100644 --- a/gcc/ChangeLog.openacc +++ b/gcc/ChangeLog.openacc @@ -1,3 +1,35 @@ +2019-09-05 Julian Brown + + * Makefile.in (OBJS): Add omp-sese.o. + * omp-built

[PATCH 4/6] [og9] Fix up tests for oaccdevlow pass splitting

2019-09-04 Thread Julian Brown
-05 Julian Brown + + * c-c++-common/goacc/classify-kernels-unparallelized.c, + c-c++-common/goacc/classify-kernels.c, + c-c++-common/goacc/classify-parallel.c, + c-c++-common/goacc/classify-routine.c, + gfortran.dg/goacc/classify-kernels-unparallelized.f95

[PATCH 1/6] [og9] Target-dependent gang-private variable decl rewriting

2019-09-04 Thread Julian Brown
07c817c..b1c627b394c 100644 --- a/gcc/ChangeLog.openacc +++ b/gcc/ChangeLog.openacc @@ -1,3 +1,16 @@ +2019-09-05 Julian Brown + + * omp-offload.c (convert.h): Include. + (struct addr_expr_rewrite_info): Add struct. + (rewrite_addr_expr): New function. + (is_sync_builtin

[PATCH 3/6] [og9] AMD GCN adjustments for middle-end worker partitioning

2019-09-04 Thread Julian Brown
(-) diff --git a/gcc/ChangeLog.openacc b/gcc/ChangeLog.openacc index a2b2dcfcf26..0d068ac8ae2 100644 --- a/gcc/ChangeLog.openacc +++ b/gcc/ChangeLog.openacc @@ -1,3 +1,18 @@ +2019-09-05 Julian Brown + + * config/gcn/gcn-protos.h (gcn_goacc_adjust_propagation_record): Rename + prototype

[PATCH 0/6] [og9] OpenACC worker partitioning in middle end (AMD GCN)

2019-09-04 Thread Julian Brown
reference variables to use temporary local scalar variables instead. Further commentary is provided alongside individual patches. Tested with offloading to AMD GCN. I will apply to the openacc-gcc-9-branch shortly. Thanks, Julian Julian Brown (6): [og9] Target-dependent gang-private var

[PATCH] [og9] Fix libgomp.oacc-fortran/lib-13.f90 async bug

2019-09-04 Thread Julian Brown
a/libgomp/ChangeLog.openacc b/libgomp/ChangeLog.openacc index f9d8e6ecd39..c7ef40e922c 100644 --- a/libgomp/ChangeLog.openacc +++ b/libgomp/ChangeLog.openacc @@ -1,3 +1,8 @@ +2019-09-05 Julian Brown + + * testsuite/libgomp.oacc-fortran/lib-13.f90: End data region after + wait API

[PATCH 3/3] [og9] Wait on queue-full condition in AMD GCN libgomp offloading plugin

2019-08-13 Thread Julian Brown
2a9a7f18ca2..f9d8e6ecd39 100644 --- a/libgomp/ChangeLog.openacc +++ b/libgomp/ChangeLog.openacc @@ -1,3 +1,8 @@ +2019-08-13 Julian Brown + + * plugin/plugin-gcn.c (queue_push_callback): Wait on queue-full + condition. + 2019-08-13 Julian Brown * plugin/plugin-gcn.c (struct

[PATCH 2/3] [og9] Use temporary buffers for async host2dev copies

2019-08-13 Thread Julian Brown
+++-- 3 files changed, 52 insertions(+), 38 deletions(-) diff --git a/libgomp/ChangeLog.openacc b/libgomp/ChangeLog.openacc index 2279545f361..2a9a7f18ca2 100644 --- a/libgomp/ChangeLog.openacc +++ b/libgomp/ChangeLog.openacc @@ -1,3 +1,17 @@ +2019-08-13 Julian Brown

[PATCH 1/3] [og9] Wait at end of OpenACC asynchronous kernels regions

2019-08-13 Thread Julian Brown
07c817c 100644 --- a/gcc/ChangeLog.openacc +++ b/gcc/ChangeLog.openacc @@ -1,3 +1,10 @@ +2019-08-13 Julian Brown + + * omp-oacc-kernels.c (add_wait): New function, split out of... + (add_async_clauses_and_wait): ...here. Call new outlined function. + (decompose_kernels_region

[PATCH 0/3] [og9] OpenACC async fixes for AMD GCN

2019-08-13 Thread Julian Brown
These patches stabilise async support for AMD GCN. Several tests that previously failed (some intermittently) now work. Further commentary is provided alongside each patch. Tested with offloading to AMD GCN. I will apply shortly to the openacc-gcc-9-branch. Thanks, Julian Julian Brown (3

[PATCH 2/3] [og9] Fix configury for AMD GCN testing

2019-08-08 Thread Julian Brown
nacc index 80d089f49e2..62c56e3bf92 100644 --- a/libgomp/ChangeLog.openacc +++ b/libgomp/ChangeLog.openacc @@ -1,3 +1,16 @@ +2019-08-08 Julian Brown + + * plugin/configfrag.ac (amdgcn): Set tgt_plugin. + * testsuite/lib/libgomp.exp (offload_target_to_openacc_device_type): + Add AMD G

[PATCH 3/3] [og9] Use a single worker for OpenACC on AMD GCN

2019-08-08 Thread Julian Brown
..84d80511603 100644 --- a/gcc/ChangeLog.openacc +++ b/gcc/ChangeLog.openacc @@ -1,3 +1,10 @@ +2019-08-08 Julian Brown + + * config/gcn/gcn.c (gcn_goacc_validate_dims): Ensure + flag_worker_partitioning is not set. + (TARGET_GOACC_WORKER_PARTITIONING): Remove target hook definition. + * config/gcn

[PATCH 1/3] [og9] Add missing exec_params libgomp plugin entry points

2019-08-08 Thread Julian Brown
a187ebb7295..80d089f49e2 100644 --- a/libgomp/ChangeLog.openacc +++ b/libgomp/ChangeLog.openacc @@ -1,3 +1,8 @@ +2019-08-08 Julian Brown + + * plugin/plugin-gcn.c (GOMP_OFFLOAD_openacc_exec_params, + GOMP_OFFLOAD_openacc_async_exec_params): New functions. + 2019-07-31 Julian Brown * testsuite

[PATCH 0/3] [og9] Initial OpenACC fixes for AMD GCN

2019-08-08 Thread Julian Brown
with offloading to AMD GCN. I will apply shortly. Thanks, Julian Julian Brown (3): [og9] Add missing exec_params libgomp plugin entry points [og9] Fix configury for AMD GCN testing [og9] Use a single worker for OpenACC on AMD GCN gcc/ChangeLog.openacc | 7 ++ gcc/config

[PATCH 8/8] [og9] Update parallel-dims.c and serial-dims.c warning line numbering.

2019-08-02 Thread Julian Brown
This patch adjusts the parallel-dims.c and serial-dims.c tests to use relative, rather than absolute, line numbers for expected warning emission. ChangeLog 2019-07-31 Julian Brown * testsuite/libgomp.oacc-c-c++-common/parallel-dims.c: Use relative line numbers for warning

[PATCH 7/8] [og9] NVPTX GOMP_OFFLOAD_openacc_async_construct arg fix and gomp_print_* support

2019-08-02 Thread Julian Brown
This patch introduces versions of the gomp_print_{string,integer,double} low-level printing functions that work for NVPTX. ChangeLog 2019-07-31 Julian Brown libgomp/ * config/nvptx/gomp_print.c (gomp_print_string, gomp_print_integer, gomp_print_double): New

[PATCH 6/8] [og9] Make OpenACC function-parameter explosion optional

2019-08-02 Thread Julian Brown
ChangeLog 2019-07-31 Julian Brown * configure.ac (amdgcn*-*-*): Add target-libffi to noconfigdirs for AMD GCN. * configure: Regenerated. gcc/ * builtin-types.def (BT_FN_VOID_INT_INT_OMPFN_SIZE_PTR_PTR_PTR_VAR): Remove. * config/i386/i386.c

[PATCH 3/8] [og9] Stub implementation of unwinding for AMD GCN

2019-08-02 Thread Julian Brown
This is a backport to the og9 branch of the patch posted here: https://gcc.gnu.org/ml/gcc-patches/2019-06/msg00443.html 2019-06-25 Andrew Stubbs Backport from mainline: libgcc/ * config/gcn/t-amdgcn (LIB2ADD): Add unwind-gcn.c. * config/gcn/unwind-gcn.c: New

[PATCH 4/8] [og9] Enable full GFortran library for AMD GCN

2019-08-02 Thread Julian Brown
This is a backport to the og9 branch of the patch posted for mainline here: https://gcc.gnu.org/ml/gcc-patches/2019-06/msg00444.html 2019-06-25 Kwok Cheung Yeung Andrew Stubbs Backport from mainline: libgfortran/ * configure: Regenerate. *

[PATCH 2/8] [og9] Create GCN-specific gthreads

2019-08-02 Thread Julian Brown
This is a backport to the og9 branch of the patch posted to mainline here: https://gcc.gnu.org/ml/gcc-patches/2019-06/msg00442.html 2019-06-25 Kwok Cheung Yeung Andrew Stubbs Backport from mainline: gcc/ * config.gcc (thread_file): Set to gcn for AMD

[PATCH 1/8] [og9] Add support for constructors and destructors on GCN

2019-08-02 Thread Julian Brown
): Define. + (_init_array, _fini_array): New. + (__preinit_array_start, __preinit_array_end, + __init_array_start, __init_array_end, + __fini_array_start, __fini_array_end): Declare weak references. + 2019-07-10 Cesar Philippidis Julian Brown diff --git a/gcc

[PATCH 0/8] [og9] AMD GCN offloading support

2019-08-02 Thread Julian Brown
tested with offloading to NVPTX (no regressions) and also with offloading to AMD GCN (results reasonable, but not fully checked). I will apply shortly. Thanks, Julian Julian Brown (8): [og9] Add support for constructors and destructors on GCN [og9] Create GCN-specific gthreads [og9] Stub

[og9] OpenACC assumed-size arrays with non-lexical data mappings

2019-07-09 Thread Julian Brown
c-9-branch shortly. Julian ChangeLog 2019-07-10 Cesar Philippidis Thomas Schwinge Julian Brown gcc/ * gimplify.c (gimplify_adjust_omp_clauses_1): Raise error for assumed-size arrays in map clauses for Fortran/OpenMP. *

[og9] Allow the accelerator to have more offloaded functions than the host

2019-07-09 Thread Julian Brown
acc @@ -1,3 +1,8 @@ +2019-07-10 Cesar Philippidis + + * target.c (gomp_load_image_to_device): Allow the accelerator to + possess more offloaded functions than the host. + 2019-07-10 Julian Brown * oacc-parallel.c (GOACC_enter_exit_data): Fix optional arguments for diff --git a/libgomp/target.

[og9] Support Fortran 2003 class pointers in OpenACC

2019-07-09 Thread Julian Brown
3f2e74d6639c4dbd43b018b6640ae8454 Mon Sep 17 00:00:00 2001 From: Julian Brown Date: Wed, 20 Feb 2019 05:21:15 -0800 Subject: [PATCH 1/3] Support Fortran 2003 class pointers in OpenACC gcc/ * gimplify.c (insert_struct_comp_map): Handle GOMP_MAP_ATTACH_DETACH. (gimplify_scan_omp_clauses): Separ

Re: [PATCH, OpenACC] Add support for gang local storage allocation in shared memory

2019-06-12 Thread Julian Brown
across all vector elements. AFAIK, that's not straightforward, and we haven't attempted to implement it. I think the original motivation for this patch was optimisation, though -- typical code won't try to use atomics in this way. Cesar's list of caveats that you linked to seems to support that notio

Re: [PATCH, OpenACC] (1/2) Fix implicit mapping for array slices on lexically-enclosing data constructs (PR70828)

2019-06-09 Thread Julian Brown
On Wed, 5 Dec 2018 21:10:45 + Julian Brown wrote: > Thanks for review! How's this version? > > I took the liberty of fixing the patch for Fortran array-descriptor > mappings that use a PSET, also, and adding another test for that > functionality. This is a ping/new versio

Re: [PATCH, OpenACC] Add support for gang local storage allocation in shared memory

2019-06-07 Thread Julian Brown
ch does something. I've introduced maybe_oacc_gangprivate_vars, and the splay tree walk is only called if that's true. It's set whenever something's put in oacc_addressable_var_decls in some omp context. Re-tested with offloading to NVPTX. OK? Thanks, Julian commit 6c2a018b

Re: [wwwdocs] Document existence of openacc-gcc-9-branch

2019-06-05 Thread Julian Brown
On Wed, 5 Jun 2019 10:30:41 +0200 Thomas Schwinge wrote: > Hi Julian! > > On Tue, 4 Jun 2019 23:05:53 +0100, Julian Brown > wrote: > > I've pushed a new branch "openacc-gcc-9-branch" to the Git > > mirror (i.e. as a Git-only branch), for development of Ope

[wwwdocs] Document existence of openacc-gcc-9-branch

2019-06-04 Thread Julian Brown
Hi, I've pushed a new branch "openacc-gcc-9-branch" to the Git mirror (i.e. as a Git-only branch), for development of OpenACC and related functionality on top of the GCC 9 branch. It's currently based off the gcc-9_1_0-release tag, and contains a number of patches mainly merged from either the

Re: [PATCH, OpenACC] Add support for gang local storage allocation in shared memory

2019-06-03 Thread Julian Brown
On Tue, 11 Dec 2018 15:08:11 + Julian Brown wrote: > Is this version OK? Re-tested with offloading to NVPTX. This is a ping for the patch posted here: https://gcc.gnu.org/ml/gcc-patches/2018-08/msg00749.html This is a new version of the patch, rebased and with a couple of additio

[PATCH, og8] Don't rescan "attach" node for dereferenced struct member

2019-02-15 Thread Julian Brown
e374d415801588435d62ac214e0313ffd3ef2198 Author: Julian Brown Date: Thu Feb 14 16:40:21 2019 -0800 [og8] Don't rescan "attach" node for dereferenced struct member gcc/ * gimplify.c (gimplify_scan_omp_clauses): Avoid scanning 'c' again after creating base-poi

[PATCH, og8] OpenACC: attach/detach array slices on dereferenced struct members

2019-01-31 Thread Julian Brown
test. * testsuite/libgomp.oacc-c-c++-common/deep-copy-9.c: New test. * testsuite/libgomp.oacc-c-c++-common/deep-copy-10.c: New test. * testsuite/libgomp.oacc-c-c++-common/deep-copy-11.c: New test. * testsuite/libgomp.oacc-c-c++-common/deep-copy-14.c: New test. commit 56101feb78bc2e3

[PATCH] Better distinguish OpenACC and OpenMP sections in libgomp.texi

2019-01-10 Thread Julian Brown
Hi, This patch looks like it should have been attached to the following email: https://gcc.gnu.org/ml/gcc-patches/2018-09/msg01173.html but it looks like the wrong patch (and ChangeLog!) were attached instead. For convenience, I'll copy Cesar's blurb (mildly corrected) from the previous

[PATCH, og8] Update _OPENACC macro, etc. for OpenACC 2.6

2019-01-09 Thread Julian Brown
Hi, This patch updates the _OPENACC macro to 201711, indicating OpenACC 2.6 support, on the openacc-gcc-8-branch. Tested with offloading to NVPTX. I will apply shortly. Cheers, Julian commit e2ff11ceee7f1294313773d013a9d68f0d4e3c02 Author: Julian Brown Date: Wed Jan 9 03:41:04 2019 -0800

Re: [patch,openacc] Fix PR71959: lto dump of callee counts

2019-01-08 Thread Julian Brown
On Sat, 22 Dec 2018 15:09:34 + Iain Sandoe wrote: > Hi Julian, > > > On 21 Dec 2018, at 16:47, Julian Brown > > wrote: > > > On Fri, 21 Dec 2018 14:31:19 +0100 > > Jakub Jelinek wrote: > > > >> On Fri, Dec 21, 2018 at 01:23:03PM +

Re: [PATCH, OpenACC] Enable GOMP_MAP_FIRSTPRIVATE_INT for OpenACC

2018-12-22 Thread Julian Brown
On Tue, 18 Dec 2018 13:47:34 +0100 Jakub Jelinek wrote: > On Thu, Dec 13, 2018 at 03:44:25PM +0000, Julian Brown wrote: > > +static tree > > +convert_to_firstprivate_int (tree var, gimple_seq *gs) > > +{ > > + tree type = TREE_TYPE (var), new_type = NULL_TREE;

Re: [patch,openacc] Fix PR71959: lto dump of callee counts

2018-12-21 Thread Julian Brown
Hi Jakub, Thanks for review! On Fri, 21 Dec 2018 14:31:19 +0100 Jakub Jelinek wrote: > On Fri, Dec 21, 2018 at 01:23:03PM +0000, Julian Brown wrote: > > 2018-xx-yy Nathan Sidwell > > > > PR lto/71959 > > libgomp/ > > * testsuite/

Re: [patch,openacc] Fix PR71959: lto dump of callee counts

2018-12-21 Thread Julian Brown
On Fri, 21 Dec 2018 02:56:36 + Julian Brown wrote: > On Tue, 25 Sep 2018 14:59:18 +0200 > Martin Jambor wrote: > > > Hi, > > > > I have noticed a few things... > > > > On Thu, Sep 20 2018, Cesar Philippidis wrote: > > > This is anothe

Re: [patch,openacc] Fix PR71959: lto dump of callee counts

2018-12-20 Thread Julian Brown
On Tue, 25 Sep 2018 14:59:18 +0200 Martin Jambor wrote: > Hi, > > I have noticed a few things... > > On Thu, Sep 20 2018, Cesar Philippidis wrote: > > This is another old gomp4 patch that demotes an ICE in PR71959 to a > > linker warning. One problem here is that it is not clear if OpenACC > >

Re: [PATCH 2/3] Factor out duplicate code in gimplify_scan_omp_clauses

2018-12-18 Thread Julian Brown
On Sat, 10 Nov 2018 09:11:19 -0800 Julian Brown wrote: > This patch, created while trying to figure out the open-coded > linked-list handling in gimplify_scan_omp_clauses, factors out four > somewhat repetitive portions of that function into two new outlined > functions. This was

Re: [patch] various OpenACC reduction enhancements - ME and nvptx changes

2018-12-13 Thread Julian Brown
c_reduction_setup): Use it to adjust the type of ref_to_res. (nvptx_goacc_reduction_init): Don't update LHS if it doesn't exist. (nvptx_goacc_reduction_fini): Call nvptx_vector_reduction for vector. Use it to adjust the type of ref_to_res. (nvptx_goacc_reduction_teardown

Re: [PATCH, OpenACC] Enable GOMP_MAP_FIRSTPRIVATE_INT for OpenACC

2018-12-13 Thread Julian Brown
On Fri, 7 Dec 2018 15:05:46 +0100 Jakub Jelinek wrote: > On Thu, Dec 06, 2018 at 10:40:41PM +0000, Julian Brown wrote: > > + && (TREE_CODE (inner_type) == REAL_TYPE > > + || (!omp_is_reference (var) > > + &

Re: [patch] various OpenACC reduction enhancements - test cases

2018-12-13 Thread Julian Brown
offloading. Is it OK for trunk? > > If Thomas is ok with this, it is ok for trunk. Here's a new version to go with the FE patch posted here: https://gcc.gnu.org/ml/gcc-patches/2018-12/msg00930.html Thanks, Julian ChangeLog 2018-xx-xx Cesar Philippidis Nathan Sidwell

Re: [patch] various OpenACC reduction enhancements - FE changes

2018-12-13 Thread Julian Brown
_parser_omp_clause_reduction (parser, > > clauses); > > + clauses = cp_parser_omp_clause_reduction (parser, > > clauses, C_ORT_OMP); c_name = "reduction"; > > break; > > case PRAGMA_OMP_CLAUSE_SCHEDULE: > > Again, needs adjustement fo

Re: [PATCH, OpenACC] Add support for gang local storage allocation in shared memory

2018-12-11 Thread Julian Brown
On Fri, 17 Aug 2018 18:39:00 +0200 Bernhard Reutner-Fischer wrote: > On 16 August 2018 17:46:43 CEST, Julian Brown > wrote: > >On Wed, 15 Aug 2018 21:56:54 +0200 > >Bernhard Reutner-Fischer wrote: > > > >> On 15 August 2018 18:46:37 CEST, Julian Brown > &g

Re: [PATCH, OpenACC] Enable GOMP_MAP_FIRSTPRIVATE_INT for OpenACC

2018-12-06 Thread Julian Brown
On Tue, 4 Dec 2018 15:27:12 +0100 Jakub Jelinek wrote: > On Thu, Sep 20, 2018 at 07:38:04PM -0400, Julian Brown wrote: > > 2018-09-20 Cesar Philippidis > > Julian Brown > > > > gcc/ > > * omp-low.c (maybe_lookup_

Re: [PATCH 0/6, OpenACC, libgomp] Async re-work

2018-12-06 Thread Julian Brown
On Thu, 6 Dec 2018 22:22:46 + Julian Brown wrote: > On Thu, 6 Dec 2018 21:42:14 +0100 > Thomas Schwinge wrote: > > > [...] > > ..., where the "Invalid read of size 8" happens, and which > > eventually would try to "free (tgt)"

Re: [PATCH 0/6, OpenACC, libgomp] Async re-work

2018-12-06 Thread Julian Brown
On Thu, 6 Dec 2018 21:42:14 +0100 Thomas Schwinge wrote: > [...] > ..., where the "Invalid read of size 8" happens, and which eventually > would try to "free (tgt)" again, via libgomp/target.c:gomp_unmap_tgt: > > attribute_hidden void > gomp_unmap_tgt (struct target_mem_desc *tgt) >

Re: [patch,openacc] Propagate independent clause for OpenACC kernels pass

2018-12-05 Thread Julian Brown
On Tue, 4 Dec 2018 14:55:03 +0100 Richard Biener wrote: > On Tue, 4 Dec 2018, Jakub Jelinek wrote: > > > On Mon, Dec 03, 2018 at 11:40:39PM +0000, Julian Brown wrote: > > > Jakub asked in the following email at the time of the patch > > > submission for the go

Re: [PATCH, OpenACC] (1/2) Fix implicit mapping for array slices on lexically-enclosing data constructs (PR70828)

2018-12-05 Thread Julian Brown
On Tue, 4 Dec 2018 15:02:15 +0100 Jakub Jelinek wrote: > On Tue, Aug 28, 2018 at 03:19:19PM -0400, Julian Brown wrote: > > 2018-08-28 Julian Brown > > Cesar Philippidis > > > > PR middle-end/70828 > > > > gcc/ > > * gimpli

Re: [PATCH, OpenACC] Support Fortran derived type members in "acc update" directives

2018-12-04 Thread Julian Brown
On Tue, 4 Dec 2018 20:12:58 +0100 Jakub Jelinek wrote: > On Tue, Dec 04, 2018 at 07:06:43PM +0000, Julian Brown wrote: > > Thanks for the review! As it happened though, I had to rewrite a > > lot of the code in this patch for the attach/detach patch, and I > > had meant

Re: [PATCH, OpenACC] Support Fortran derived type members in "acc update" directives

2018-12-04 Thread Julian Brown
Hi Jakub, On Tue, 4 Dec 2018 15:17:08 +0100 Jakub Jelinek wrote: > On Mon, Sep 03, 2018 at 08:46:54PM -0400, Julian Brown wrote: > > 2018-09-03 Cesar Philippidis > > > > gcc/fortran/ > > * openmp.c (gfc_match_omp_variable_list): New allow_d

Re: [patch,opencc] Don't mark OpenACC auto loops as independent inside acc parallel regions

2018-12-03 Thread Julian Brown
On Thu, 20 Sep 2018 09:49:43 -0700 Cesar Philippidis wrote: > OpenACC as a concept of loop independence, in which independent loops > may be executed in parallel across gangs, workers and vectors. Inside > acc parallel regions, if a loop isn't explicitly marked seq or auto, > it is predetermined

Re: [patch,openacc] Set safelen to INT_MAX for oacc independent pragma

2018-12-03 Thread Julian Brown
On Thu, 20 Sep 2018 11:21:28 -0700 Cesar Philippidis wrote: > This is another old gomp4 OpenACC patch which impacts targets that use > simd vectorization, such as the host and AMD GCN, rather than nvptx. > Basically, as the subject states, it sets safelen to INT_MAX for > independent acc loops,

Re: [patch,openacc] Propagate independent clause for OpenACC kernels pass

2018-12-03 Thread Julian Brown
On Thu, 20 Sep 2018 11:06:40 -0700 Cesar Philippidis wrote: > This is another old patch teaches the omp expansion pass how to > propagate the acc loop independent clause to the later stages > throughout compilation. Unfortunately, it didn't include any test > cases. I'm not sure how effective

Re: [patch,openacc] C, C++ OpenACC wait diagnostic change

2018-12-03 Thread Julian Brown
ase that: "args != NULL && args->length () == > 0", I suppose? (I have not verified that.) > > Oh, and next to "wait ()" please also add test coverage for "wait (". I've made those changes in the attached, thank you. OK? Julian ChangeLog 2018-XX-YY

Re: [PATCH] OpenACC 2.6 manual deep copy support (attach/detach)

2018-12-03 Thread Julian Brown
On Fri, 30 Nov 2018 03:41:09 -0800 Julian Brown wrote: > This is a new version of the patch incorporating > several improvements/bugfixes made on the og8 branch: I released I forgot (again!) to incorporate the changes suggested by Bernhard in: https://gcc.gnu.org/ml/gcc-patches/2

Re: [committed] Clean up Fortran OpenACC wait clause handling

2018-12-03 Thread Julian Brown
On Fri, 30 Nov 2018 21:48:20 +0100 Thomas Schwinge wrote: > Hi! > > commit 3e3de40a5ab21d72f08071a7a40120dd05608cc1 > Author: tschwinge > Date: Fri Nov 30 20:39:18 2018 + > > Clean up Fortran OpenACC wait clause handling > > "wait" can be deduced from "wait_list". > >

Re: [patch,openacc] Fix infinite recursion in OMP clause pretty-printing, default label

2018-11-30 Thread Julian Brown
On Thu, 29 Nov 2018 21:25:33 + Joseph Myers wrote: > On Thu, 29 Nov 2018, Julian Brown wrote: > > > On Thu, 20 Sep 2018 10:08:51 -0700 > > Cesar Philippidis wrote: > > > > > Apparently, Tom ran into an ICE when we were adding support for > > &g

Re: [patch,openacc] Fix acc_shutdown issue

2018-11-30 Thread Julian Brown
On Thu, 20 Sep 2018 10:05:30 -0700 Cesar Philippidis wrote: > Attached is an old gomp4 patch that allegedly fixes an shutdown > runtime issue involving OpenACC accelerators. Unfortunately, the > original patch didn't include a test case, nor did it generate any > regressions in the libgomp

[PATCH] OpenACC reference count consistency checking

2018-11-30 Thread Julian Brown
This is a trunk-compatible version of the patch posted here: https://gcc.gnu.org/ml/gcc-patches/2018-11/msg02365.html I understand it may not be suitable for committing (especially not outside stage 1 -- though it's "obviously harmless" in its dormant state), but it might be helpful for

Re: [PATCH] Adjust offsets for present data clauses

2018-11-30 Thread Julian Brown
On Fri, 30 Nov 2018 17:55:17 +0800 Chung-Lin Tang wrote: > On 2018/7/21 6:07 AM, Cesar Philippidis wrote: > > This is another old gomp4 patch that corrects a bug where the > > runtime was passing the wrong offset for subarray data to the > > accelerator. The original description of this patch

Re: [patch,openacc] use existing local variable in cp_parser_oacc_enter_exit_data

2018-11-29 Thread Julian Brown
On Wed, 26 Sep 2018 11:21:33 -0700 Cesar Philippidis wrote: > This is an old gomp4 patch that updates the location of the clause for > acc enter/exit data. Apparently, it didn't impact any test cases. Is > this OK for trunk or should we drop it from OG8? > > I bootstrapped and regtested it for

Re: [patch,openacc] C, C++ OpenACC wait diagnostic change

2018-11-29 Thread Julian Brown
On Fri, 28 Sep 2018 14:17:42 +0100 Julian Brown wrote: > On Wed, 26 Sep 2018 14:08:37 -0700 > Cesar Philippidis wrote: > > > On 09/26/2018 12:50 PM, Joseph Myers wrote: > > > On Wed, 26 Sep 2018, Cesar Philippidis wrote: > > > > > >> Attac

Re: [patch,openacc] Fix infinite recursion in OMP clause pretty-printing, default label

2018-11-29 Thread Julian Brown
On Thu, 20 Sep 2018 10:08:51 -0700 Cesar Philippidis wrote: > Apparently, Tom ran into an ICE when we were adding support for new > clauses back in the gomp-4_0-branch days. This patch shouldn't be > necessary because all of the clauses are fully implemented now, but > it may prevent similar

[PATCH 1/2] [og8] Further OpenACC reference-counting improvements

2018-11-28 Thread Julian Brown
This is the main set of improvements to reference-counting behaviour (see parent email for further details). ChangeLog libgomp/ * libgomp.h (splay_tree_key_s): Substitute dynamic_refcount field for virtual_refcount. (acc_dispatch_t): Remove data_environ field.

[PATCH 0/2] [og8] Further OpenACC/libgomp refcounting fixes

2018-11-28 Thread Julian Brown
structure. That might have been the intention before in fact, but the implementation was inconsistent. I will apply to the og8 branch shortly. Julian Brown (2): [og8] Further OpenACC reference-counting improvements [og8] OpenACC reference count consistenc

[PATCH 2/2] [og8] OpenACC reference count consistency checking

2018-11-28 Thread Julian Brown
This is the reference count consistency-checking code. The model used for checking is as follows. 1. Each splay tree key that references a target memory descriptor increases that descriptor's refcount by 1. 2. Each variable listed in a target memory descriptor that links back to a

[PATCH 5/6] [og8] Backport parts of upstream declare-allocate patch

2018-11-20 Thread Julian Brown
This patch adjusts mappings used for some special cases in Fortran (e.g. allocatable scalars) on og8 to match code that is already upstream, or that has been submitted but not yet reviewed. Parts taken from https://gcc.gnu.org/ml/gcc-patches/2018-09/msg01205.html and parts reverted from

[PATCH 6/6] [og8] OpenACC refcounting refresh

2018-11-20 Thread Julian Brown
This patch represents a mild overhaul of reference counting for OpenACC in libgomp. It's been partly automatically checked (using code not yet quite finished nor submitted upstream), but it's already more precise than the pre-patch implementation (as demonstrated by adjustments to

[PATCH 3/6] [og8] OpenACC 2.6 manual deep copy support (attach/detach)

2018-11-20 Thread Julian Brown
Previously posted upstream: https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00826.html gcc/c/ * c-parser.c (c_parser_omp_variable_list): Allow deref (->) in variable lists. (c_parser_oacc_all_clauses): Re-alphabetize cases. * c-typeck.c

[PATCH 0/6] [og8] OpenACC attach/detach

2018-11-20 Thread Julian Brown
that are not yet upstream. It also contains improvements to the reference counting behaviour, partially verified using self-checking code (not quite complete, and not yet submitted). Tested (as a series) with offloading to nvptx. I will apply to the openacc-gcc-8-branch shortly. Julian Brown (6): [og8

[PATCH 4/6] [og8] Interaction of dynamic/multidimensional arrays with attach/detach.

2018-11-20 Thread Julian Brown
OpenACC multidimensional (or "dynamic") arrays do not seem to fit very neatly into the attach/detach mechanism described for OpenACC 2.6, that is if the user tries to use a multidimensional array as a field in a struct. This patch disallows that combination, for now at least. Multidimensional

[PATCH 1/6] [og8] Host-to-device transfer coalescing & magic offset value self-documentation

2018-11-20 Thread Julian Brown
Previously posted upstream: https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00825.html libgomp/ * libgomp.h (OFFSET_INLINED, OFFSET_POINTER, OFFSET_STRUCT): Define. * target.c (FIELD_TGT_EMPTY): Define. (gomp_coalesce_chunk): New. (gomp_coalesce_buf): Use

[PATCH 2/6] [og8] Factor out duplicate code in gimplify_scan_omp_clauses

2018-11-20 Thread Julian Brown
Previously posted upstream: https://gcc.gnu.org/ml/gcc-patches/2018-11/msg00824.html gcc/ * gimplify.c (insert_struct_component_mapping) (check_base_and_compare_lt): New. (gimplify_scan_omp_clauses): Outline duplicated code into calls to above two

[PATCH 3/3] OpenACC 2.6 manual deep copy support (attach/detach)

2018-11-10 Thread Julian Brown
This patch implements the bulk of support for OpenACC 2.6 manual deep copy for the C, C++ and Fortran front-ends, the middle end and the libgomp runtime. I've incorporated parts of the patches previously posted by Cesar: https://gcc.gnu.org/ml/gcc-patches/2018-10/msg01941.html

[PATCH 2/3] Factor out duplicate code in gimplify_scan_omp_clauses

2018-11-10 Thread Julian Brown
This patch, created while trying to figure out the open-coded linked-list handling in gimplify_scan_omp_clauses, factors out four somewhat repetitive portions of that function into two new outlined functions. This was done largely mechanically; the actual lines of executed code are more-or-less

[PATCH 1/3] Host-to-device transfer coalescing & magic offset value self-documentation

2018-11-10 Thread Julian Brown
This patch (by Cesar, with some minor additional changes) replaces usage of several magic constants in target.c with named macros, and replaces the flat array of size_t pairs used for coalescing host-to-device copies with an array of a new struct with start/end fields instead. Tested and

[PATCH 0/3] OpenACC 2.6 manual deep copy support (attach/detach)

2018-11-10 Thread Julian Brown
h contains the bulk of the changes. I'll write more about those in their respective emails. This patch series relies on the libgomp async implementation rework done by Chung-Lin, posted previously: https://gcc.gnu.org/ml/gcc-patches/2018-09/msg01424.html Julian Brown (3): Host-to-device transfer coal

Re: Default compute dimensions (runtime)

2018-10-05 Thread Julian Brown
stream yet. Thus, this rebased and retested patch consists of the parsing changes (for -fopenacc-dim=X:Y:Z, allowing '-') and warning changes (for strange partitioning choices), plus associated testsuite adjustments. Tested with offloading to NVPTX and bootstrapped. OK for trunk? Thanks, Julian

Re: [PATCH, OpenACC] Fortran "declare create"/allocate support for OpenACC

2018-10-04 Thread Julian Brown
On Sun, 23 Sep 2018 10:48:52 +0200 Bernhard Reutner-Fischer wrote: > On Sat, 22 Sep 2018 at 00:32, Julian Brown > wrote: > > @@ -6218,13 +6221,20 @@ add_clause (gfc_symbol *sym, gfc_omp_map_op > map_op) { >gfc_omp_namelist *n; > > + if (!module_oacc_clauses) &g

Re: [patch,openacc] C, C++ OpenACC wait diagnostic change

2018-09-28 Thread Julian Brown
fore end of line Actually I'm not too sure how useful the second error line is. Maybe we should just remove it to improve consistency between C & C++? The attached has been tested with offloading to nvptx and bootstrapped. OK? Thanks, Julian 2018-XX-YY James Norris Cesar

Re: [PATCH][OpenACC] Update deviceptr handling during gimplification

2018-09-25 Thread Julian Brown
On Tue, 7 Aug 2018 15:09:38 -0700 Cesar Philippidis wrote: > I had previously posted this patch as part of a monster deviceptr > patch here > . This > patch breaks out the generic gimplifier changes. Essentially, with > this patch, the

Re: [PATCH, OpenACC] Fortran "declare create"/allocate support for OpenACC

2018-09-21 Thread Julian Brown
lease dont mix declarations and definitions, i.e. please put > gfc_trans_oacc_declare_allocate() into trans-openmp.c, and add the > declaration to trans.h, in the corresponding /* In trans-openmp.c */ > block there. Do you mean like this? Thanks, Julian ChangeLog 2018-09-20 Cesar Philippi

[PATCH, OpenACC] Fortran "declare create"/allocate support for OpenACC

2018-09-20 Thread Julian Brown
2018-09-20 Cesar Philippidis Julian Brown gcc/ * omp-low.c (scan_sharing_clauses): Update handling of OpenACC declare create, declare copyin and declare deviceptr to have local lifetimes. (convert_to_firstprivate_int): Handle pointer types.

[PATCH, OpenACC] Enable GOMP_MAP_FIRSTPRIVATE_INT for OpenACC

2018-09-20 Thread Julian Brown
e pointers correspond to host pointers that are actually type-punned scalars. Tested with offloading to NVPTX and bootstrapped. OK for mainline? Julian ChangeLog 2018-09-20 Cesar Philippidis Julian Brown gcc/ * omp-low.c (maybe_lookup_field_in_outer_ctx): Ne

Re: [PATCH 03/25] Improve TARGET_MANGLE_DECL_ASSEMBLER_NAME.

2018-09-19 Thread Julian Brown
On Fri, 14 Sep 2018 22:49:35 -0400 Julian Brown wrote: > > > On 12/09/18 16:16, Richard Biener wrote: > > > It may well be that there's a better way to solve the problem, or > > > at least to do the lookups. > > > > > > It may also b

Re: [PATCH 03/25] Improve TARGET_MANGLE_DECL_ASSEMBLER_NAME.

2018-09-14 Thread Julian Brown
On Wed, 12 Sep 2018 13:34:06 -0400 Julian Brown wrote: > On Wed, 12 Sep 2018 17:31:58 +0100 > Andrew Stubbs wrote: > > > On 12/09/18 16:16, Richard Biener wrote: > > > I think the symptom GCN sees needs to be better understood - like > > > wheter it

Re: [PATCH 03/25] Improve TARGET_MANGLE_DECL_ASSEMBLER_NAME.

2018-09-12 Thread Julian Brown
On Wed, 12 Sep 2018 17:31:58 +0100 Andrew Stubbs wrote: > On 12/09/18 16:16, Richard Biener wrote: > > I think the symptom GCN sees needs to be better understood - like > > wheter it is generally OK to mangle things arbitrarily. > > The name mangling is a horrible workaround for a bug in the

Re: [PATCH, OpenACC] C++ reference mapping (PR middle-end/86336)

2018-09-11 Thread Julian Brown
On Mon, 10 Sep 2018 20:31:49 -0400 Julian Brown wrote: > [...] I think the handling of references can and should match between > the two APIs (though implementation details of the patch to make that > so need a little work still). Here's a new version of the patch, somewhat s

Re: [PATCH, OpenACC] C++ reference mapping (PR middle-end/86336)

2018-09-10 Thread Julian Brown
On Mon, 10 Sep 2018 22:22:15 +0100 Jason Merrill wrote: > On Mon, Sep 10, 2018 at 7:07 PM, Julian Brown > wrote: > > I think it's more accurate to say that OpenACC says nothing about > > C++ references at all, nor about how unadorned pointers are mapped > > in copy/co

Re: [PATCH, OpenACC] C++ reference mapping (PR middle-end/86336)

2018-09-10 Thread Julian Brown
On Mon, 10 Sep 2018 10:52:47 -0700 Cesar Philippidis wrote: > On 09/10/2018 10:37 AM, Jason Merrill wrote: > > On Mon, Sep 10, 2018 at 4:05 AM, Julian Brown > > wrote: > >> This patch (by Cesar) changes the way C++ references are mapped in > >> OpenACC regions

[PATCH, OpenACC] C++ reference mapping (PR middle-end/86336)

2018-09-09 Thread Julian Brown
with offloading to NVPTX and bootstrapped. OK for trunk? Thanks, Julian ChangeLog 2018-09-09 Cesar Philippidis Julian Brown PR middle-end/86336 gcc/cp/ * semantics.c (finish_omp_clauses): Map C++ references by value and FIRSTPRIVATE_REFERENCE

[PATCH, OpenACC] Support Fortran derived type members in "acc update" directives

2018-09-03 Thread Julian Brown
libgomp.oacc-fortran/derived-type-1.f90: New test. commit a7e1f0958d38bfda7474fbaf6bb31951351ab66d Author: Julian Brown Date: Thu Aug 30 17:00:58 2018 -0700 Derived types for acc update. 2018-09-03 Cesar Philippidis gcc/fortran/ * openmp.c (gfc_match_omp_variable_list

Re: [PATCH, OpenACC] Support C++ "this" in OpenACC directives (PR66053)

2018-09-03 Thread Julian Brown
On Fri, 31 Aug 2018 16:20:08 +0200 Jakub Jelinek wrote: > On Fri, Aug 31, 2018 at 10:04:07AM -0400, Nathan Sidwell wrote: > > On 08/30/2018 04:27 PM, Jason Merrill wrote: > > > > > On Thu, Aug 30, 2018 at 3:31 PM, Julian Brown > > > wrote: > >

[PATCH, OpenACC] Support C++ "this" in OpenACC directives (PR66053)

2018-08-30 Thread Julian Brown
d_array_ref): Adjust cxx_mark_addressble call. (cxx_mark_addressable): Handle CXX_MARK_ADDRESSABLE_FLAGS_ALLOW_THIS. libgomp/ * testsuite/libgomp.oacc-c++/this.C: New test. commit 12294a1345d981b72ef61d285057fb4c7e378fd7 Author: Julian Brown Date: Wed Aug 29 18:19:44 2018 -0700 Support C++ &q

[PATCH, OpenACC] OpenACC subarray data alignment in Fortran

2018-08-29 Thread Julian Brown
. Tested with offloading to NVPTX and bootstrapped. Posted previously as part of the patch: https://gcc.gnu.org/ml/gcc-patches/2018-06/msg01896.html OK? Julian ChangeLog 20xx-xx-xx Cesar Philippidis Julian Brown gcc/fortran/ * trans-openmp.c

Re: [PATCH, OpenACC] (2/2) Fix implicit mapping for array slices on lexically-enclosing data constructs (PR70828)

2018-08-28 Thread Julian Brown
On Tue, 28 Aug 2018 12:23:22 -0700 Cesar Philippidis wrote: > On 08/28/2018 12:19 PM, Julian Brown wrote: > > > diff --git a/gcc/fortran/trans-openmp.c b/gcc/fortran/trans-openmp.c > > index f038f4c..86be407 100644 > > --- a/gcc/fortran/trans-openmp.c > > ++

[PATCH, OpenACC] (2/2) Fix implicit mapping for array slices on lexically-enclosing data constructs (PR70828)

2018-08-28 Thread Julian Brown
nvptx. OK to apply? Thanks, Julian 2018-08-28 Julian Brown gcc/fortran/ * trans-openmp.c (gfc_omp_finish_clause): Don't raise error for assumed-size array if present in a lexically-enclosing data construct. libgomp/ * testsuite/libgomp.oacc-fortran/pr70828-

<    1   2   3   4   5   6   7   8   9   >