[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

Joel E. Denny via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 21 11:22:15 PDT 2019


jdenny added a comment.

In D65835#1639700 <https://reviews.llvm.org/D65835#1639700>, @ABataev wrote:

> Chwck 2 ifs: `if (IsVariableUsedInMapClause)` and the second `if (IsByRef && Ty.getNonReferenceType()->isScalarType())`. If the variable is mapped, `IsByRef` is set to `true`, but later it may be changed in the second if, when we check for the use in the `firstprivate` clause. We need to add a check, that the `IsByRef` must be set to `false` onlly if `IsVariableUsedInMapClause` is set to `false` too for combined target constructs.


I've tried that.  It results in capturing by reference on both the target region and the teams region in the case of a combined target teams construct.  Thus, we end up with different codegen than when the directives are separate, where capturing by reference is set only on the target region.

The changes I just backed out handle this correctly because they distinguish between the target and teams regions.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65835/new/

https://reviews.llvm.org/D65835





More information about the cfe-commits mailing list