[PATCH] [WIP] openmp: Add OpenMP 5.0 task detach clause support

Jakub Jelinek jakub@redhat.com
Fri Dec 18 16:42:24 GMT 2020


On Thu, Dec 10, 2020 at 03:38:40PM +0100, Jakub Jelinek via Gcc-patches wrote:
One further thing, the detach clause effectively writes to the var, so
unless you mark the clause decl addressable as I've suggested, you should
if (omp_shared_to_firstprivate_optimizable_decl_p (decl))
  omp_mark_stores (gimplify_omp_ctxp->outer_context, decl);
e.g. in gimplify_adjust_omp_clauses OMP_CLAUSE_DETACH: handling, to make
sure that outer parallel/task etc. regions don't try to optimize the var
from shared to firstprivate through OMP_CLAUSE_SHARED_READONLY flag on
OMP_CLAUSE_SHARED.

	Jakub



More information about the Gcc-patches mailing list