[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-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-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-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] 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-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] 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-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-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. @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

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-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

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

[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 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 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 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-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-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-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 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 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-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-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] 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] 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 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 updated this revision to Diff 221991. lildmh added a comment. Fix mapper type checking CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67978/new/ https://reviews.llvm.org/D67978 Files: lib/Sema/SemaOpenMP.cpp test/OpenMP/declare_mapper_messages.c test/OpenMP/declare_mapper_m

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

2019-09-26 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 221990. lildmh retitled this revision from "[OpenMP 5.0] Fix user-defined mapper lookup in sema for arrays" to "[OpenMP 5.0] Fix user-defined mapper lookup in sema". lildmh edited the summary of this revision. CHANGES SINCE LAST ACTION https://reviews.llvm.o

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

2019-09-26 Thread Lingda Li via Phabricator via cfe-commits
lildmh added a comment. In D67978#1684169 , @ABataev wrote: > In D67978#1684104 , @lildmh wrote: > > > In D67978#1683166 , @ABataev wrote: > > > > > In D67978#1683146

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

2019-09-26 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added a comment. In D67978#1683166 , @ABataev wrote: > In D67978#1683146 , @lildmh wrote: > > > HI Alexey, the ast print test is already there. Because I didn't check

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

2019-09-25 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added a comment. HI Alexey, the ast print test is already there. Because I didn't check the mapper for array type before, such code will always not report any error, and ast print test is correct. Codegen test belongs to the other patch I released.

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

2019-09-24 Thread Lingda Li via Phabricator via cfe-commits
lildmh added a comment. In D67978#1681388 , @ABataev wrote: > In D67978#1681333 , @lildmh wrote: > > > In D67978#1681319 , @ABataev wrote: > > > > > In D67978#1681318

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

2019-09-24 Thread Lingda Li via Phabricator via cfe-commits
lildmh added a comment. In D67978#1681319 , @ABataev wrote: > In D67978#1681318 , @lildmh wrote: > > > Without this patch, it cannot recognize array with mapper, for instance, > > `#pragma omp target map(mapper(a),

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

2019-09-24 Thread Lingda Li via Phabricator via cfe-commits
lildmh added a comment. Without this patch, it cannot recognize array with mapper, for instance, `#pragma omp target map(mapper(a),to: arr[0:2])` won't work without this patch. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67978/new/ https://reviews.llvm.org/D67

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

2019-09-24 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 221578. 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/CGStmtOpenMP.cpp lib/CodeGen/C

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

2019-09-24 Thread Lingda Li via Phabricator via cfe-commits
lildmh created this revision. lildmh added reviewers: ABataev, Meinersbur, hfinkel, jdoerfert. lildmh added a project: OpenMP. Herald added subscribers: cfe-commits, guansong. Herald added a project: clang. This patches fixes the case when a user-defined mapper is attached to the elements of an a

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

2019-09-20 Thread Lingda Li via Phabricator via cfe-commits
lildmh created this revision. Herald added subscribers: cfe-commits, guansong. Herald added a reviewer: jdoerfert. Herald added a project: clang. This patch implements the code generation to use OpenMP 5.0 declare mapper (e.g., user-defined mapper) constructs. It looks up the proper mapper functi

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

2019-08-05 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 213339. lildmh added a comment. Fix declare mapper codegen test when the function argument has name attached. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59474/new/ https://reviews.llvm.org/D59474 Files: include/clang/AST/GlobalDecl.h lib/AST/

[PATCH] D56326: [OpenMP 5.0] Parsing/sema support for "omp declare mapper" directive

2019-08-02 Thread Lingda Li via Phabricator via cfe-commits
lildmh added a comment. Hi David, An extra bit is needed to be added to `IdentifierNamespace`, and I could not find another field to shrink its width. As a result, it ends up larger than a word now. If you have a better solution, I'll be happy to know. Thanks, Lingda Repository: rC Clang

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

2019-07-30 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 212399. lildmh marked an inline comment as done. lildmh added a comment. Change mapper function argument checking CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59474/new/ https://reviews.llvm.org/D59474 Files: include/clang/AST/GlobalDecl.h lib/

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

2019-07-29 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: test/OpenMP/declare_mapper_codegen.cpp:44-48 +// CK0-DAG: store i8* %0, i8** [[HANDLEADDR:%[^,]+]] +// CK0-DAG: store i8* %1, i8** [[BPTRADDR:%[^,]+]] +// CK0-DAG: store i8* %2, i8** [[VPTRADDR:%[^

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

2019-07-29 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: test/OpenMP/declare_mapper_codegen.cpp:44-48 +// CK0-DAG: store i8* %0, i8** [[HANDLEADDR:%[^,]+]] +// CK0-DAG: store i8* %1, i8** [[BPTRADDR:%[^,]+]] +// CK0-DAG: store i8* %2, i8** [[VPTRADDR:%[^

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

2019-07-29 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added a comment. Thanks Alexey! Could you look into the runtime patch D60972 then? Comment at: test/OpenMP/declare_mapper_codegen.cpp:44-48 +// CK0-DAG: store i8* %0, i8** [[HANDLEADDR:%[^,]+]] +

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

2019-07-26 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 211991. lildmh added a comment. Make `emitUDMapperArrayInitOrDel` private CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59474/new/ https://reviews.llvm.org/D59474 Files: include/clang/AST/GlobalDecl.h lib/AST/ASTContext.cpp lib/CodeGen/CGDecl.

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

2019-07-26 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:815 + /// code generation. + void emitUDMapperArrayInitOrDel(CodeGenFunction &MapperCGF, + llvm::Value *Handle, llvm::Value *BasePtr

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

2019-07-25 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 211794. lildmh added a comment. Remove virtual from function declaration CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59474/new/ https://reviews.llvm.org/D59474 Files: include/clang/AST/GlobalDecl.h lib/AST/ASTContext.cpp lib/CodeGen/CGDecl.c

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

2019-07-25 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:2110 + /// Emit code for the user defined mapper construct. + void emitUserDefinedMapper(const OMPDeclareMapperDecl *D, + CodeGenFunction

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

2019-07-25 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:2110 + /// Emit code for the user defined mapper construct. + void emitUserDefinedMapper(const OMPDeclareMapperDecl *D, + CodeGenFunction

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

2019-07-25 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:2110 + /// Emit code for the user defined mapper construct. + void emitUserDefinedMapper(const OMPDeclareMapperDecl *D, + CodeGenFunction

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

2019-07-24 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 211589. lildmh added a comment. Get rid of MSVC requirement of this, and a virtual function CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59474/new/ https://reviews.llvm.org/D59474 Files: include/clang/AST/GlobalDecl.h lib/AST/ASTContext.cpp l

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

2019-07-23 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked 3 inline comments as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:7116-7124 + /// Get the offset of the OMP_MAP_MEMBER_OF field. + static unsigned getFlagMemberOffset() { +unsigned Offset = 0; +for (uint64_t Remain = OMP_

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

2019-07-23 Thread Lingda Li via Phabricator via cfe-commits
lildmh added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:2533 + CodeGenFunction *CGF) { + if (!LangOpts.OpenMP || LangOpts.OpenMPSimd || + (!LangOpts.EmitAllDecls && !D->isUsed())) ABataev wrote: > Why do we n

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

2019-07-23 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 211333. lildmh marked 4 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59474/new/ https://reviews.llvm.org/D59474 Files: include/clang/AST/GlobalDecl.h lib/AST/ASTContext.cpp lib/CodeGen/CGDecl.cpp lib/CodeGen/CGOpenMPR

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

2019-07-23 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 211278. lildmh added a comment. Herald added a reviewer: jdoerfert. Rebase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59474/new/ https://reviews.llvm.org/D59474 Files: include/clang/AST/GlobalDecl.h lib/AST/ASTContext.cpp lib/CodeGen/CGDecl

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

2019-07-17 Thread Lingda Li via Phabricator via cfe-commits
lildmh added a comment. In D59474#1589464 , @ABataev wrote: > In D59474#1561161 , @lildmh wrote: > > > Change the type of size from `size_t` to `int64_t`, and rebase > > > Lingda, could you rebase it again? Thanks.

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

2019-06-27 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 206895. lildmh added a comment. Change the type of size from `size_t` to `int64_t`, and rebase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59474/new/ https://reviews.llvm.org/D59474 Files: include/clang/AST/GlobalDecl.h lib/AST/ASTContext.cpp

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

2019-06-27 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8739 +/// // For each component specified by this mapper: +/// if (currentComponent.hasMapper()) +/// (*currentComponent.Mapper())(rt_mapper_handle, ar

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

2019-06-27 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8739 +/// // For each component specified by this mapper: +/// if (currentComponent.hasMapper()) +/// (*currentComponent.Mapper())(rt_mapper_handle, ar

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

2019-06-27 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8739 +/// // For each component specified by this mapper: +/// if (currentComponent.hasMapper()) +/// (*currentComponent.Mapper())(rt_mapper_handle, ar

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

2019-06-27 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8739 +/// // For each component specified by this mapper: +/// if (currentComponent.hasMapper()) +/// (*currentComponent.Mapper())(rt_mapper_handle, ar

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

2019-06-27 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8739 +/// // For each component specified by this mapper: +/// if (currentComponent.hasMapper()) +/// (*currentComponent.Mapper())(rt_mapper_handle, ar

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

2019-06-26 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8739 +/// // For each component specified by this mapper: +/// if (currentComponent.hasMapper()) +/// (*currentComponent.Mapper())(rt_mapper_handle, ar

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

2019-06-26 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8739 +/// // For each component specified by this mapper: +/// if (currentComponent.hasMapper()) +/// (*currentComponent.Mapper())(rt_mapper_handle, ar

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

2019-06-26 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked 2 inline comments as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8739 +/// // For each component specified by this mapper: +/// if (currentComponent.hasMapper()) +/// (*currentComponent.Mapper())(rt_mapper_handle, ar

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

2019-06-26 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked 2 inline comments as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8739 +/// // For each component specified by this mapper: +/// if (currentComponent.hasMapper()) +/// (*currentComponent.Mapper())(rt_mapper_handle, ar

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

2019-06-26 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:744 OMPRTL__tgt_target_data_update_nowait, + // Call to int64_t __tgt_mapper_num_components(void *rt_mapper_handle); + OMPRTL__tgt_mapper_num_components, --

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

2019-06-26 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8739 +/// // For each component specified by this mapper: +/// if (currentComponent.hasMapper()) +/// (*currentComponent.Mapper())(rt_mapper_handle, ar

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

2019-06-25 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 206527. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59474/new/ https://reviews.llvm.org/D59474 Files: include/clang/AST/GlobalDecl.h lib/AST/ASTContext.cpp lib/CodeGen/CGDecl.cpp lib/CodeGen/CGOpenMPRuntime.cpp lib/CodeGen/CGOpenMPRuntime.

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

2019-06-25 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked 2 inline comments as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:744 OMPRTL__tgt_target_data_update_nowait, + // Call to int64_t __tgt_mapper_num_components(void *rt_mapper_handle); + OMPRTL__tgt_mapper_num_components, --

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

2019-06-25 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked 4 inline comments as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8739 +/// // For each component specified by this mapper: +/// if (currentComponent.hasMapper()) +/// (*currentComponent.Mapper())(rt_mapper_handle, ar

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

2019-06-25 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8739 +/// // For each component specified by this mapper: +/// if (currentComponent.hasMapper()) +/// (*currentComponent.Mapper())(rt_mapper_handle, ar

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

2019-06-20 Thread Lingda Li via Phabricator via cfe-commits
lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8739 +/// // For each component specified by this mapper: +/// if (currentComponent.hasMapper()) +/// (*currentComponent.Mapper())(rt_mapper_handle, arg_base, arg_begin, ABata

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

2019-06-20 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 205785. lildmh marked 9 inline comments as done. lildmh added a comment. Address Alexey's comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59474/new/ https://reviews.llvm.org/D59474 Files: include/clang/AST/GlobalDecl.h lib/AST/ASTContext.

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

2019-06-19 Thread Lingda Li via Phabricator via cfe-commits
lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8739 +/// // For each component specified by this mapper: +/// if (currentComponent.hasMapper()) +/// (*currentComponent.Mapper())(rt_mapper_handle, arg_base, arg_begin, ABata

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

2019-06-19 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 205647. lildmh marked 3 inline comments as done. lildmh added a comment. Fix mapper function name mangling CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59474/new/ https://reviews.llvm.org/D59474 Files: include/clang/AST/GlobalDecl.h lib/AST/AST

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

2019-06-10 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8729 +/// \code +/// void .omp_mapper...(void *rt_mapper_handle, +/// void *base, void *begin, ABataev wro

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

2019-06-10 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8729 +/// \code +/// void .omp_mapper...(void *rt_mapper_handle, +/// void *base, void *begin, ABataev wro

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

2019-06-10 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8729 +/// \code +/// void .omp_mapper...(void *rt_mapper_handle, +/// void *base, void *begin, ABataev wro

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

2019-06-10 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked an inline comment as done. lildmh added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8729 +/// \code +/// void .omp_mapper...(void *rt_mapper_handle, +/// void *base, void *begin, ABataev wro

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

2019-06-06 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 203438. lildmh added a comment. Use __tgt instead of __kmpc for mapper runtime function names CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59474/new/ https://reviews.llvm.org/D59474 Files: include/clang/AST/GlobalDecl.h lib/AST/ASTContext.cpp

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

2019-06-04 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 202926. lildmh added a comment. Address Alexey's comment about mapping between function and user-defined mappers CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59474/new/ https://reviews.llvm.org/D59474 Files: include/clang/AST/GlobalDecl.h lib/A

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

2019-06-03 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 202790. lildmh edited the summary of this revision. lildmh added a comment. Implement the new mapper codegen scheme CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59474/new/ https://reviews.llvm.org/D59474 Files: include/clang/AST/GlobalDecl.h li

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

2019-05-03 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked 3 inline comments as done. lildmh added a comment. Hi Alexey, Let's discuss your runtime data mapping scheme next week first. After that we will continue the review of this. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8530 + // dynamically. + QualType

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

2019-05-03 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 198050. lildmh added a comment. Fix code format CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59474/new/ https://reviews.llvm.org/D59474 Files: include/clang/AST/GlobalDecl.h lib/AST/ASTContext.cpp lib/CodeGen/CGDecl.cpp lib/CodeGen/CGOpenMP

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

2019-05-03 Thread Lingda Li via Phabricator via cfe-commits
lildmh marked 7 inline comments as done. lildmh added a comment. Hi Alexey, Again, thanks for your review! Sorry I didn't get back to you in time because I was distracted by other things. Please see the comments inline. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:8021 + ///

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

2019-04-26 Thread Lingda Li via Phabricator via cfe-commits
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: >

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

2019-04-26 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 196880. lildmh added a comment. Combine 2 pointers into one. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59474/new/ https://reviews.llvm.org/D59474 Files: include/clang/AST/GlobalDecl.h lib/AST/ASTContext.cpp lib/CodeGen/CGDecl.cpp lib/Cod

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

2019-03-17 Thread Lingda Li via Phabricator via cfe-commits
lildmh created this revision. lildmh added reviewers: ABataev, hfinkel, Meinersbur, kkwli0. lildmh added a project: OpenMP. Herald added subscribers: cfe-commits, jdoerfert, guansong. Herald added a project: clang. This patch implements the code generation for OpenMP 5.0 declare mapper (user-defi

[PATCH] D58638: [OpenMP 5.0] Parsing/sema support for from clause with mapper modifier

2019-02-25 Thread Lingda Li via Phabricator via cfe-commits
lildmh created this revision. lildmh added reviewers: ABataev, hfinkel, Meinersbur, kkwli0. lildmh added a project: OpenMP. Herald added subscribers: cfe-commits, jdoerfert, guansong. Herald added a project: clang. This patch implements the parsing and sema support for OpenMP from clause with pot

[PATCH] D58523: [OpenMP 5.0] Parsing/sema support for to clause with mapper modifier

2019-02-22 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 187970. lildmh added a comment. Rebase CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58523/new/ https://reviews.llvm.org/D58523 Files: include/clang/AST/OpenMPClause.h include/clang/Basic/DiagnosticParseKinds.td include/clang/Basic/OpenMPKinds

[PATCH] D58523: [OpenMP 5.0] Parsing/sema support for to clause with mapper modifier

2019-02-22 Thread Lingda Li via Phabricator via cfe-commits
lildmh added a comment. Thanks a lot! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58523/new/ https://reviews.llvm.org/D58523 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[PATCH] D58523: [OpenMP 5.0] Parsing/sema support for to clause with mapper modifier

2019-02-22 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 187964. lildmh marked 4 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58523/new/ https://reviews.llvm.org/D58523 Files: include/clang/AST/OpenMPClause.h include/clang/Basic/DiagnosticParseKinds.td include/clang/Basic/Ope

[PATCH] D58523: [OpenMP 5.0] Parsing/sema support for to clause with mapper modifier

2019-02-22 Thread Lingda Li via Phabricator via cfe-commits
lildmh added inline comments. Comment at: lib/Sema/SemaOpenMP.cpp:13195 - } else { -MVLI.UDMapperList.push_back(nullptr); } ABataev wrote: > Is this correct for `from` clause? Yes, it's correct for `from`, which will never use `MVLI.UDMapperLi

[PATCH] D58523: [OpenMP 5.0] Parsing/sema support for to clause with mapper modifier

2019-02-22 Thread Lingda Li via Phabricator via cfe-commits
lildmh updated this revision to Diff 187958. lildmh retitled this revision from "[OpenMP 5.0] Parsing/sema support for to and from clauses with mapper modifier" to "[OpenMP 5.0] Parsing/sema support for to clause with mapper modifier". lildmh edited the summary of this revision. lildmh added a co

  1   2   >