lildmh marked 2 inline comments as done.
lildmh added inline comments.
================
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(
----------------
ABataev wrote:
> 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.
From interface, the mapper function uses size in bytes now. Inside, it needs
number of elements to iterate through all elements. This has no impact on the
runtime part, since it looks like normal mapping from the interface. All
conversion happens inside the mapper function which is completely generated by
the compiler.
================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9244
+llvm::Function *
+CGOpenMPRuntime::getUserDefinedMapperFunc(const OMPDeclareMapperDecl *D) {
+ auto I = UDMMap.find(D);
----------------
ABataev wrote:
> `getOrEmitUserDefinedMapperFunc`?
I guess `getUserDefinedMapperFunc` is a better name? Because the user uses this
function to get the mapper function. Emitting a mapper function is a side
effect.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67833/new/
https://reviews.llvm.org/D67833
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits