Re: [PATCH v3] OpenMP 5.0: Allow multiple clauses mapping same variable

Tobias Burnus <[email protected]>
Newsgroups gmane.comp.gcc.patches,gmane.comp.gcc.fortran
Message-ID <[email protected]>
Paul-Antoine Arras wrote:
> This patch allows multiple clauses on the same construct to map the same
> variable, which was not valid in OpenMP 4.5, but allowed in 5.0.
>
> Internally, map clauses have to be deduplicated or merged before reaching the
> topological sort in gimplify.cc, lest they might result in a cycle. This happens
> in two places: first in the respective front-ends before any clause expansion,
> then in the gimplifier just before grouping. The second pass is necessary due to
> early clause expansion in the FE reintroducing some duplication (see
> map-multi-2.f90).
...
> This version of the patch only allows multiple clauses mapping the same variable
> on OpenMP code; similar OpenACC code will still be rejected (for now). It also
> fixes some minor issues: allow array section bounds to be null and run
> target-map-multi-2 only on offload device.

…

LGTM – Thanks for the patch!

Tobias
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.