Re: [PATCH v3 06/11] OpenMP: Pointers and member mappings

2022-09-30 Thread Tobias Burnus
On 30.09.22 15:30, Julian Brown wrote: On Fri, 23 Sep 2022 14:10:51 +0200 Tobias Burnus wrote: ... I added n->expr->expr_type == EXPR_VARIABLE to the condition -- I think that should suffice for now? Yes. A similar mean way to write code would be: integer, ta

Re: [PATCH v3 06/11] OpenMP: Pointers and member mappings

2022-09-30 Thread Tobias Burnus
Hi Julian, On 30.09.22 15:30, Julian Brown wrote: i = 1; j = 2 map (foo(i)%dt_ptr(1:3), foo(j)%dt_ptr) Good catch! In that gfc_dep_resolver considers those terms to have a dependency, and that triggers the mapping node transformation. But I don't think OpenMP allows you to write this: IIUC

Re: [PATCH v3 06/11] OpenMP: Pointers and member mappings

2022-09-30 Thread Julian Brown
On Fri, 23 Sep 2022 14:10:51 +0200 Tobias Burnus wrote: > Hi Julian and Jakub, hi all, > > On 23.09.22 09:29, Julian Brown wrote: > > How about this version? (Re-tested.) > > Some more generic (pre)remarks – not affecting the patch code, > but possibly the commit log message: > > > This foll

Re: [PATCH v3 06/11] OpenMP: Pointers and member mappings

2022-09-23 Thread Tobias Burnus
Hi Julian and Jakub, hi all, On 23.09.22 09:29, Julian Brown wrote: How about this version? (Re-tested.) [...] * * * Some more generic (pre)remarks – not affecting the patch code, but possibly the commit log message: This follows OMP 5.0, 2.19.7.1 "map Clause": which is also in "OMP 5.2, 5

Re: [PATCH v3 06/11] OpenMP: Pointers and member mappings

2022-09-23 Thread Jakub Jelinek via Gcc-patches
On Fri, Sep 23, 2022 at 08:29:46AM +0100, Julian Brown wrote: > On Thu, 22 Sep 2022 15:17:08 +0200 > Jakub Jelinek wrote: > > > > + bool built_sym_hash = false; > > > > So, I think usually we don't construct such hash_maps right away, > > but have just pointer to the hash map initialized to N

Re: [PATCH v3 06/11] OpenMP: Pointers and member mappings

2022-09-23 Thread Julian Brown
On Thu, 22 Sep 2022 15:17:08 +0200 Jakub Jelinek wrote: > > + bool built_sym_hash = false; > > So, I think usually we don't construct such hash_maps right away, > but have just pointer to the hash map initialized to NULL (then you > don't need to built_sym_hash next to it) and you simply new

Re: [PATCH v3 06/11] OpenMP: Pointers and member mappings

2022-09-22 Thread Jakub Jelinek via Gcc-patches
On Sun, Sep 18, 2022 at 08:19:29PM +0100, Julian Brown wrote: > @@ -2609,6 +2672,9 @@ gfc_trans_omp_clauses (stmtblock_t *block, > gfc_omp_clauses *clauses, >if (clauses == NULL) > return NULL_TREE; > > + hash_map sym_rooted_nl; Isn't hash_map ctor pretty costly (allocates memory etc.

Re: [PATCH v3 06/11] OpenMP: Pointers and member mappings

2022-09-18 Thread Julian Brown
On Wed, 14 Sep 2022 14:53:54 +0200 Jakub Jelinek wrote: > On Tue, Sep 13, 2022 at 02:03:16PM -0700, Julian Brown wrote: > > @@ -3440,6 +3437,50 @@ gfc_trans_omp_clauses (stmtblock_t *block, > > gfc_omp_clauses *clauses, { > > if (pointer || (openacc && allocatable)) > >

Re: [PATCH v3 06/11] OpenMP: Pointers and member mappings

2022-09-14 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 13, 2022 at 02:03:16PM -0700, Julian Brown wrote: > @@ -3440,6 +3437,50 @@ gfc_trans_omp_clauses (stmtblock_t *block, > gfc_omp_clauses *clauses, > { > if (pointer || (openacc && allocatable)) > { > + gfc

[PATCH v3 06/11] OpenMP: Pointers and member mappings

2022-09-13 Thread Julian Brown
This patch was previously posted as part of the series supporting "declare mapper" for Fortran, here: https://gcc.gnu.org/pipermail/gcc-patches/2022-June/596041.html Implementing the "omp declare mapper" functionality, I noticed some cases where handling of derived type members that are pointer