[PATCH] D67978: [OpenMP 5.0] Fix user-defined mapper lookup in sema

2019-09-26 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:14805 + if (!Type->isStructureOrClassType() && !Type->isUnionType() && + (MapperIdScopeSpec.isSet() || MapperId.getAsString() != "default")) { +SemaRef.Diag(Loc, d

[PATCH] D67978: [OpenMP 5.0] Fix user-defined mapper lookup in sema

2019-09-26 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:14805 + if (!Type->isStructureOrClassType() && !Type->isUnionType() && + (MapperIdScopeSpec.isSet() || MapperId.getAsString() != "default")) { +SemaRef.Diag(Loc, d

[PATCH] D67978: [OpenMP 5.0] Fix user-defined mapper lookup in sema

2019-09-26 Thread Lingda Li via Phabricator via cfe-commits
lildmh added a comment. Thanks Alexey! Please check the other 2 mapper patches at https://reviews.llvm.org/D67833 and https://reviews.llvm.org/D68100 when you have time. They should be the last mapper patches. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67978/new/ https://reviews.ll

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

2019-09-26 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 222066. lildmh added a comment. Rebase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67833/new/ https://reviews.llvm.org/D67833 Files: include/clang/AST/OpenMPClause.h lib/CodeGen/CGOpenMPRuntime.cpp lib/CodeGen/CGOpenMPRuntime.h lib/CodeGen

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

2020-07-15 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 278344. lildmh added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Include the llvm part CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67833/new/ https://reviews.llvm.org/D67833 Files: clang/include/clang/AST/Op

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

2020-07-15 Thread Lingda Li via Phabricator via cfe-commits
lildmh added a comment. In D67833#2154312 , @grokos wrote: > I tried to build clang with this patch and I get errors like: > > CGOpenMPRuntime.cpp:9463:38: error: > ‘OMPRTL___tgt_target_teams_nowait_mapper’ was not declared in this scope >

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

2020-07-16 Thread Lingda Li via Phabricator via cfe-commits
lildmh added a comment. In D67833#2155196 , @fhahn wrote: > I think this change introduced the following warnings, where `auto &` is used > for types that are always copied. It would be great if you could take a look. > > lvm-project/clang/lib/CodeGen/C

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

2020-07-16 Thread Lingda Li via Phabricator via cfe-commits
lildmh added a comment. Fix is at https://reviews.llvm.org/D83959 @Meinersbur Michael, could you please help upstream the patch above? Thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67833/new/ https://reviews.llvm.org/D67833 __

[PATCH] D83959: Fix compiling warnings in OpenMP declare mapper codegen

2020-07-16 Thread Lingda Li via Phabricator via cfe-commits
lildmh added a comment. Thanks George! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83959/new/ https://reviews.llvm.org/D83959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

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

2020-07-20 Thread Lingda Li via Phabricator via cfe-commits
lildmh added a comment. In D67833#2161241 , @Meinersbur wrote: > Seems that it already has been applied ;-) Yes, thanks Michael. Hope everything goes well with you Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

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

2020-07-22 Thread Lingda Li via Phabricator via cfe-commits
lildmh added a comment. In D67833#2166478 , @protze.joachim wrote: > Starting with the commit of this patch, the libomptarget test > `llvm-project/openmp/libomptarget/test/offloading/target_depend_nowait.cpp` > fails. Here is a stacktrace of the segfaul

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

2020-07-22 Thread Lingda Li via Phabricator via cfe-commits
lildmh added a comment. I couldn't reproduce this problem because all commands are ignored on my machine. Could you send the exact compiling and running commands? In the IR files you sent me before, any idea where segfault happens? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

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

2020-07-23 Thread Lingda Li via Phabricator via cfe-commits
lildmh added a comment. Can you check if https://reviews.llvm.org/D84470 fixes the problem as this test doesn't work on my machine? If yes, please accept and upstream it since I don't have the permission. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

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

2020-07-14 Thread Lingda Li via Phabricator via cfe-commits
lildmh requested review of this revision. lildmh added a comment. I'll update the diff and please check and accept after that CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67833/new/ https://reviews.llvm.org/D67833 ___ cfe-commits mailing l

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

2020-07-15 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 278291. lildmh added a comment. Update diff and pass test. Please accept CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67833/new/ https://reviews.llvm.org/D67833 Files: clang/include/clang/AST/OpenMPClause.h clang/lib/CodeGen/CGOpenMPRuntime.cpp

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

2020-07-15 Thread Lingda Li via Phabricator via cfe-commits
lildmh added a comment. @grokos Could you upstream this patch and the runtime patch neck to neck? Upstreaming one of them will break the OpenMP offloading. It will be nice if you can test this patch locally with the runtime patch. Thanks CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67

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

2019-11-13 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 229200. lildmh added a comment. Rebase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67833/new/ https://reviews.llvm.org/D67833 Files: include/clang/AST/OpenMPClause.h lib/CodeGen/CGOpenMPRuntime.cpp lib/CodeGen/CGOpenMPRuntime.h lib/CodeGen

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

2019-12-16 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 234113. lildmh marked 28 inline comments as done. lildmh added a comment. Rebase and address comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67833/new/ https://reviews.llvm.org/D67833 Files: clang/include/clang/AST/OpenMPClause.h clang/li

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

2019-12-16 Thread Lingda Li via Phabricator via cfe-commits
lildmh added a comment. I'll split the patch into 2 later Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:7388 - llvm::Value *getExprTypeSize(const Expr *E) const { + llvm::Value *getExprTypeSize(const Expr *E, bool hasMapper) const { QualType ExprTy = E->getType().getCano

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

2019-12-16 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked 5 inline comments as done. lildmh added a comment. Alexey, thanks for the review Comment at: clang/include/clang/AST/OpenMPClause.h:4918 const OMPMappableExprListSizeTy &Sizes) - : OMPMappableExprListClause(OMPC_map, Locs, Sizes, &Map

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

2019-12-16 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked 4 inline comments as done. lildmh added inline comments. Comment at: clang/include/clang/AST/OpenMPClause.h:4918 const OMPMappableExprListSizeTy &Sizes) - : OMPMappableExprListClause(OMPC_map, Locs, Sizes, &MapperQualifierLoc, -

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

2019-12-17 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: clang/include/clang/AST/OpenMPClause.h:4918 const OMPMappableExprListSizeTy &Sizes) - : OMPMappableExprListClause(OMPC_map, Locs, Sizes, &MapperQualifierLoc, -

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

2019-12-18 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 234554. lildmh marked 3 inline comments as done. lildmh added a comment. Address Alexey's comments to change mapper function size and refactor code CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67833/new/ https://reviews.llvm.org/D67833 Files: cla

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

2019-12-18 Thread Lingda Li via Phabricator via cfe-commits
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.getInt

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

2019-12-18 Thread Lingda Li via Phabricator via cfe-commits
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.getInt

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

2019-12-18 Thread Lingda Li via Phabricator via cfe-commits
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 *M

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

2019-12-18 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 234579. lildmh added a comment. Change the function name CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67833/new/ https://reviews.llvm.org/D67833 Files: clang/include/clang/AST/OpenMPClause.h clang/lib/CodeGen/CGOpenMPRuntime.cpp clang/lib/Cod

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

2019-12-18 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment 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.getInt

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

2019-12-18 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment 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.getInt

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

2019-12-18 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment 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.getInt

<    1   2