[PATCH] D59474: [OpenMP 5.0] Codegen support for user-defined mappers

Lingda Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 26 10:36:53 PDT 2019

lildmh marked 3 inline comments as done.
lildmh added inline comments.

Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:2390
+  case OMPRTL__tgt_target_data_mapper: {
+    // Build void __tgt_target_data_mapper(int64_t device_id, int32_t arg_num,
ABataev wrote:
> You need to implement these mapper functions first.
The runtime part is on hold for now.

Comment at: lib/CodeGen/CGOpenMPRuntime.h:351
+  /// is the asynchronous version.
+  llvm::DenseMap<const OMPDeclareMapperDecl *,
+                 std::pair<llvm::Function *, llvm::Function *>>
ABataev wrote:
> You should be very careful with this map. If the mapper is declared in the function context, it must be removed from this map as soon as the function processing is completed. All local declarations are removed after this and their address might be used again.
Yes, I plan to have this part in the next patch, which will implement to look up the corresponding mapper function for map. to, from clauses



More information about the cfe-commits mailing list