[PATCH] D67833: [OpenMP 5.0] Codegen support to pass user-defined mapper functions to runtime

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 18 09:22:40 PST 2019


ABataev added a comment.

Looks much better in general, need to resolve last one issue with number of elements/size and you're ready.



================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:8981-8982
+  // Convert the size in bytes into the number of array elements.
+  Size = MapperCGF.Builder.CreateExactUDiv(
+      Size, MapperCGF.Builder.getInt64(ElementSize.getQuantity()));
   llvm::Value *PtrBegin = MapperCGF.Builder.CreateBitCast(
----------------
So, we're still going to use number of elements for mappers? And pass it in the same parameter that in other cases is used as size in bytes? If so, point to it explicitly in the review for the runtime part so all are informed about it.


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9244
+llvm::Function *
+CGOpenMPRuntime::getUserDefinedMapperFunc(const OMPDeclareMapperDecl *D) {
+  auto I = UDMMap.find(D);
----------------
`getOrEmitUserDefinedMapperFunc`?


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

https://reviews.llvm.org/D67833





More information about the cfe-commits mailing list