Re: [PATCH, OpenMP, v2] Implement uses_allocators clause for target regions

2022-06-06 Thread Jakub Jelinek via Gcc-patches
On Mon, Jun 06, 2022 at 09:38:30PM +0800, Chung-Lin Tang wrote: > I'll file a bugzilla for the target construct. Thanks. > That said, can we delay FIELD_DECL support for uses_allocators? (which is > target construct only) > Since it appears to be not trivial at the moment. Sure. But would be

Re: [PATCH, OpenMP, v2] Implement uses_allocators clause for target regions

2022-06-06 Thread Chung-Lin Tang
On 2022/6/6 9:22 下午, Jakub Jelinek wrote: On Mon, Jun 06, 2022 at 09:19:18PM +0800, Chung-Lin Tang wrote: On 2022/5/31 6:02 PM, Jakub Jelinek wrote: 5) for C++, we should handle FIELD_DECLs, but it shouldn't be hard, just look how it is handled for private too Jakub About

Re: [PATCH, OpenMP, v2] Implement uses_allocators clause for target regions

2022-06-06 Thread Jakub Jelinek via Gcc-patches
On Mon, Jun 06, 2022 at 09:19:18PM +0800, Chung-Lin Tang wrote: > On 2022/5/31 6:02 PM, Jakub Jelinek wrote: > > 5) for C++, we should handle FIELD_DECLs, but it shouldn't be hard, just > > look how it is handled for private too > > > > Jakub > > About private() for non-static members,

Re: [PATCH, OpenMP, v2] Implement uses_allocators clause for target regions

2022-06-06 Thread Chung-Lin Tang
On 2022/5/31 6:02 PM, Jakub Jelinek wrote: 5) for C++, we should handle FIELD_DECLs, but it shouldn't be hard, just look how it is handled for private too Jakub About private() for non-static members, is it really working right now? A simple test: struct C {

Re: [PATCH, OpenMP, v2] Implement uses_allocators clause for target regions

2022-05-31 Thread Jakub Jelinek via Gcc-patches
On Mon, May 30, 2022 at 07:23:55PM +0200, Jakub Jelinek via Gcc-patches wrote: > On Mon, May 30, 2022 at 10:43:30PM +0800, Chung-Lin Tang wrote: > > > This feels like you only accept a single allocator in the new syntax, > > > but that isn't my reading of the spec, I'd understand it as: > > >

Re: [PATCH, OpenMP, v2] Implement uses_allocators clause for target regions

2022-05-30 Thread Jakub Jelinek via Gcc-patches
On Mon, May 30, 2022 at 10:43:30PM +0800, Chung-Lin Tang wrote: > > This feels like you only accept a single allocator in the new syntax, > > but that isn't my reading of the spec, I'd understand it as: > > uses_allocators (memspace(omp_high_bw_mem_space), traits(foo_traits) : bar, > > baz, qux)

Re: [PATCH, OpenMP, v2] Implement uses_allocators clause for target regions

2022-05-30 Thread Chung-Lin Tang
Hi Jakub, this is v3 of the uses_allocators patch. On 2022/5/20 1:46 AM, Jakub Jelinek wrote: On Tue, May 10, 2022 at 07:29:23PM +0800, Chung-Lin Tang wrote: @@ -15624,6 +15626,233 @@ c_parser_omp_clause_allocate (c_parser *parser, tree list) return nl; } +/* OpenMP 5.2: +

Re: [PATCH, OpenMP, v2] Implement uses_allocators clause for target regions

2022-05-20 Thread Tobias Burnus
Hi Jakub, On 19.05.22 18:00, Jakub Jelinek wrote: On Tue, May 10, 2022 at 07:29:23PM +0800, Chung-Lin Tang wrote: I've attached v2 of the patch. Currently in testing. Just a general rant, the non-requires dynamic_allocators support seems to be a total mess in the standard. Probably something

Re: [PATCH, OpenMP, v2] Implement uses_allocators clause for target regions

2022-05-19 Thread Jakub Jelinek via Gcc-patches
On Thu, May 19, 2022 at 06:02:43PM +0100, Andrew Stubbs wrote: > On 19/05/2022 17:00, Jakub Jelinek wrote: > > Without requires dynamic_allocators, there are various extra restrictions > > imposed: > > 1) omp_init_allocator/omp_destroy_allocator may not be called (except for > > implicit calls

Re: [PATCH, OpenMP, v2] Implement uses_allocators clause for target regions

2022-05-19 Thread Jakub Jelinek via Gcc-patches
On Tue, May 10, 2022 at 07:29:23PM +0800, Chung-Lin Tang wrote: > @@ -15624,6 +15626,233 @@ c_parser_omp_clause_allocate (c_parser *parser, > tree list) >return nl; > } > > +/* OpenMP 5.2: > + uses_allocators ( allocator-list ) As uses_allocators is a 5.0 feature already, the above

Re: [PATCH, OpenMP, v2] Implement uses_allocators clause for target regions

2022-05-19 Thread Andrew Stubbs
On 19/05/2022 17:00, Jakub Jelinek wrote: Without requires dynamic_allocators, there are various extra restrictions imposed: 1) omp_init_allocator/omp_destroy_allocator may not be called (except for implicit calls to it from uses_allocators) in a target region I interpreted that more like

Re: [PATCH, OpenMP, v2] Implement uses_allocators clause for target regions

2022-05-19 Thread Jakub Jelinek via Gcc-patches
On Tue, May 10, 2022 at 07:29:23PM +0800, Chung-Lin Tang wrote: > I've attached v2 of the patch. Currently in testing. Just a general rant, the non-requires dynamic_allocators support seems to be a total mess in the standard. Probably something that should be discussed on omp-lang. Allocators