ABataev added a comment.
`is_device_ptr` can be considered as a kind of mapping clause (see 2.19.7
Data-Mapping Attribute Rules, Clauses, and Directives), so, I assume, clang
correct here in terms of OpenMP 4.5.
Thus, I would not call this a "fix", this is just a new feature from OpenMP 5.0.
Plus, these changes are not enough to support this new feature from OpenMP 5.0.
There definitely must be some changes in the codegen. If the variable is mapped
in the target construct, we should not generate a code for the private clause
of this variable on the target construct, since, in this case, private clauses
are applied for the inner subdirectives, which are the part of the combined
directive, but not the `target` part of the directive.
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:10895
+ // combined construct.
+ if (CurrDir == OMPD_target) {
OpenMPClauseKind ConflictKind;
----------------
I would suggest to guard this change and limit this new functionality only for
OpenMP 5.0.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65835/new/
https://reviews.llvm.org/D65835
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits