[PATCH] D83061: [OpenMP] Implement TR8 `present` map type modifier in Clang (1/2)
Joel E. Denny via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 2 10:47:36 PDT 2020
jdenny created this revision.
jdenny added reviewers: ABataev, jdoerfert, hfinkel, Meinersbur, kkwli0, grokos, sfantao, gtbercea.
Herald added subscribers: cfe-commits, sstefan1, guansong, yaxunl.
Herald added a project: clang.
jdenny added a parent revision: D83057: [OpenMP][NFC] Remove hard-coded line numbers from more tests.
jdenny removed a subscriber: llvm-commits.
jdenny added a reviewer: Hahnfeld.
jdenny added a child revision: D83062: [OpenMP] Implement TR8 `present` map type modifier in runtime (2/2).
This patch implements Clang front end support for the OpenMP TR8
`present` map type modifier. The next patch in this series implements
OpenMP runtime support.
This patch does not implement the `defaultmap` implicit behavior
`present`.
A `present` map type modifier behavior that this patch does not
attempt to implement is TR8 sec. 2.22.7.1 "map Clause", p. 319,
L14-16:
> If a map clause with a present map-type-modifier is present in a map
> clause, then the effect of the clause is ordered before all other
> map clauses that do not have the present modifier.
Compare to L10-11:
> For a given construct, the effect of a map clause with the to, from,
> or tofrom map-type is ordered before the effect of a map clause with
> the alloc, release, or delete map-type.
I have some questions before this patch is ready for a detailed
review:
1. Is either passage quoted above relevant for any case that does not involve aliasing?
2. As far as I can tell, Clang does not implement L10-11 to handle aliasing. Is it expected that it already does? If not, then I think both passages should be implemented together later. Any objections?
3. What should the order be in the case of `map(tofrom:expr1) map(present,alloc:expr2)`?
4. The Clang codegen test files are difficult to maintain because of their sizes, but I tried to insert `present` tests into them anyway to be consistent with the existing `always` and `close` tests. I'd like to move all `present` codegen tests to separate test files. Any objections?
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D83061
Files:
clang/include/clang/AST/OpenMPClause.h
clang/include/clang/Basic/DiagnosticParseKinds.td
clang/include/clang/Basic/OpenMPKinds.def
clang/lib/CodeGen/CGOpenMPRuntime.cpp
clang/lib/Parse/ParseOpenMP.cpp
clang/lib/Sema/SemaOpenMP.cpp
clang/test/OpenMP/target_ast_print.cpp
clang/test/OpenMP/target_data_ast_print.cpp
clang/test/OpenMP/target_data_codegen.cpp
clang/test/OpenMP/target_defaultmap_codegen.cpp
clang/test/OpenMP/target_enter_data_codegen.cpp
clang/test/OpenMP/target_map_codegen.cpp
clang/test/OpenMP/target_map_messages.cpp
clang/test/OpenMP/target_parallel_for_map_messages.cpp
clang/test/OpenMP/target_parallel_for_simd_map_messages.cpp
clang/test/OpenMP/target_parallel_map_messages.cpp
clang/test/OpenMP/target_simd_map_messages.cpp
clang/test/OpenMP/target_teams_distribute_map_messages.cpp
clang/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp
clang/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp
clang/test/OpenMP/target_teams_distribute_simd_map_messages.cpp
clang/test/OpenMP/target_teams_map_messages.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83061.275152.patch
Type: text/x-patch
Size: 77126 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200702/759cd57b/attachment.bin>
More information about the llvm-commits
mailing list