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

Lingda Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 18 10:35:33 PST 2019


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


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:8986
       CGM.getTypes().ConvertTypeForMem(C.getPointerType(PtrTy)));
   llvm::Value *PtrEnd = MapperCGF.Builder.CreateGEP(PtrBegin, Size);
   llvm::Value *MapType = MapperCGF.EmitLoadOfScalar(
----------------
`Size` is used to compute the last element position, which is used as the loop boundary.


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9207
   llvm::Value *IsArray = MapperCGF.Builder.CreateICmpSGE(
       Size, MapperCGF.Builder.getInt64(1), "omp.arrayinit.isarray");
   MapperCGF.Builder.CreateCondBr(IsArray, IsDeleteBB, ExitBB);
----------------
`Size` is used to see if this is an array.


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

https://reviews.llvm.org/D67833





More information about the cfe-commits mailing list