ABataev added a comment.

In D65835#1639685 <https://reviews.llvm.org/D65835#1639685>, @jdenny wrote:

> In D65835#1639622 <https://reviews.llvm.org/D65835#1639622>, @ABataev wrote:
>
> > We don't need this new level counter to correctly handle this situation. 
> > Just check for the combined target directive in 
> > `Sema::isOpenMPCapturedByRef` and return true if it is mapped as to from or 
> > just from. The change must be very simple.
>
>
> I don't see a way to do that without also affecting capturing on the teams 
> region in the case of a combined target teams construct.
>
> If it's simple, it might save time for both of us if you post the change 
> you're thinking of here.


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.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65835



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to