[PATCH] D63009: [OpenMP] Add target task alloc function with device ID

2019-06-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:5122 +NewTask = CGF.EmitRuntimeCall( + createRuntimeFunction(OMPRTL__kmpc_omp_target_task_alloc), AllocArgs); + } else { gtbercea wrote: > ABataev wrote: > > Can we use the same

[PATCH] D63009: [OpenMP] Add target task alloc function with device ID

2019-06-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:5122 +NewTask = CGF.EmitRuntimeCall( + createRuntimeFunction(OMPRTL__kmpc_omp_target_task_alloc), AllocArgs); + } else { gtbercea wrote: > ABataev wrote: > > gtbercea wrote: > >

[PATCH] D63009: [OpenMP] Add target task alloc function with device ID

2019-06-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:5122 +NewTask = CGF.EmitRuntimeCall( + createRuntimeFunction(OMPRTL__kmpc_omp_target_task_alloc), AllocArgs); + } else { gtbercea wrote: > ABataev wrote: > > gtbercea wrote: > >

[PATCH] D60883: [OpenMP] Avoid emitting maps for target link variables when unified memory is used

2019-06-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:1628 + /// Return whether the unified_shared_memory has been specified. + bool hasRequiresUnifiedSharedMemory(); }; You can make this function const. Repository: rC Clang CHANGES SIN

[PATCH] D63108: [OpenMP] Add support for handling declare target to clause when unified memory is required

2019-06-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Will review it next week, when I'm back to work, need to think about it a little bit. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63108/new/ https://reviews.llvm.org/D63108 ___ cfe-commits

[PATCH] D63009: [OpenMP] Add target task alloc function with device ID

2019-06-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev requested changes to this revision. ABataev added a comment. This revision now requires changes to proceed. The tests must check the device ID for target-based calls of the task alloc function. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63009/new/ http

[PATCH] D63009: [OpenMP] Add target task alloc function with device ID

2019-06-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D63009#1544758 , @Hahnfeld wrote: > Am I correct that the second to last revision ("- Fix tests.") removed all > checks for the actual `device_id` argument from the tests? From my point of > view that's not fixing but weakenin

[PATCH] D63009: [OpenMP] Add target task alloc function with device ID

2019-06-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D63009#1544900 , @gtbercea wrote: > In D63009#1544758 , @Hahnfeld wrote: > > > Am I correct that the second to last revision ("- Fix tests.") removed all > > checks for the actual `devic

[PATCH] D63009: [OpenMP] Add target task alloc function with device ID

2019-06-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D63009#1545152 , @gtbercea wrote: > In D63009#1544984 , @ABataev wrote: > > > In D63009#1544900 , @gtbercea > > wrote: > > > > > In D63009#154475

[PATCH] D63454: [OpenMP] Strengthen regression tests for task allocation under nowait depend clauses NFC

2019-06-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63454/new/ https://reviews.llvm.org/D63454 ___ cfe-commits ma

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

2019-06-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev 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, Curr

[PATCH] D63108: [OpenMP] Add support for handling declare target to clause when unified memory is required

2019-06-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGExpr.cpp:2297-2319 +static Address emitDeclTargetToVarDeclLValue(CodeGenFunction &CGF, + const VarDecl *VD, QualType T) { + llvm::Optional Res = + OMPDeclareTargetDeclAttr::

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

2019-06-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev 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, lild

[PATCH] D63108: [OpenMP] Add support for handling declare target to clause when unified memory is required

2019-06-20 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:2566-2569 + if (*Res == OMPDeclareTargetDeclAttr::MT_Link) +OS << CGM.getMangledName(GlobalDecl(VD)) << "_decl_tgt_link_ptr"; + else +OS << CGM.getMangledName(GlobalDecl(VD)) << "

[PATCH] D63108: [OpenMP] Add support for handling declare target to clause when unified memory is required

2019-06-20 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:9227-9229 + } else if ((*Res == OMPDeclareTargetDeclAttr::MT_Link) || + (*Res == OMPDeclareTargetDeclAttr::MT_To && + HasRequiresUnifiedSharedMemory)) { Use `asse

[PATCH] D63108: [OpenMP] Add support for handling declare target to clause when unified memory is required

2019-06-20 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63108/new/ https://reviews.llvm.org/D63108 ___ cfe-commits ma

[PATCH] D64585: [OpenMP] With nested parallelism, threadprivate variables become shared on outer parallel when appearing in inner parallel copyin clause

2019-07-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:15329 +if (getLangOpts().OpenMP && getLangOpts().OpenMPUseTLS) { + // Avoid capturing TLS-backed threadprivate variables in outer scopes. this is not the right place to fix this bug

[PATCH] D64585: [OpenMP] With nested parallelism, threadprivate variables become shared on outer parallel when appearing in inner parallel copyin clause

2019-07-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:15329 +if (getLangOpts().OpenMP && getLangOpts().OpenMPUseTLS) { + // Avoid capturing TLS-backed threadprivate variables in outer scopes. Prince781 wrote: > ABataev wrote: > > this

[PATCH] D64592: [OpenMP] Fix unified memory implementation for multiple compilation units

2019-07-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:2567 + std::hash HashFn; + size_t hash = 0; + if (!CGM.getCodeGenOpts().MainFileName.empty()) 1. Capitalize the first letter in tbe variable name. 2. Why do you need to use

[PATCH] D64646: [OPENMP]Add support for analysis of if clauses.

2019-07-12 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added a reviewer: NoQ. Herald added subscribers: jdoerfert, jfb, guansong. Herald added a project: clang. Added support for analysis of if clauses in the OpenMP directives to be able to check for the use of uninitialized variables. Repository: rC Clang h

[PATCH] D64646: [OPENMP]Add support for analysis of if clauses.

2019-07-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev marked an inline comment as done. ABataev added a comment. Thanks for the review! Comment at: test/Analysis/cfg-openmp.cpp:58-67 #pragma omp distribute simd for (int i = 0; i < 10; ++i) argc = x; -// CHECK-NEXT: 27: x -// CHECK-NEXT: 28: [B1.27] (ImplicitCast

[PATCH] D64646: [OPENMP]Add support for analysis of if clauses.

2019-07-15 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366068: [OPENMP]Add support for analysis of if clauses. (authored by ABataev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LA

[PATCH] D64765: [OPENMP]Add support for analysis of firstprivate variables.

2019-07-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added a reviewer: NoQ. Herald added subscribers: jdoerfert, guansong. Herald added a project: clang. Firstprivate variables are the variables, for which the private copies must be created in the OpenMP regions and must be initialized with the original values.

[PATCH] D64765: [OPENMP]Add support for analysis of firstprivate variables.

2019-07-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev marked 2 inline comments as done. ABataev added inline comments. Comment at: lib/Analysis/CFG.cpp:4749 // bidirectional, so we need to create temp vector. - for (Stmt *S : llvm::reverse(llvm::to_vector<8>( - OMPExecutableDirective::used_clauses_children(D->c

[PATCH] D64765: [OPENMP]Add support for analysis of firstprivate variables.

2019-07-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 210100. ABataev added a comment. Rebase Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64765/new/ https://reviews.llvm.org/D64765 Files: include/clang/AST/OpenMPClause.h test/Analysis/cfg-openmp.cpp test/OpenMP/distribu

[PATCH] D64842: [OPENMP] Fix crash in LoopCounterRefChecker when MemberExpr is not Var or Field

2019-07-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64842/new/ https://reviews.llvm.org/D64842 ___ cfe-commits mailing list cfe-commits@l

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

2019-07-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. 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. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59474/new/ https://reviews.ll

[PATCH] D64592: [OpenMP] Fix unified memory implementation for multiple compilation units

2019-07-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:2610 + auto *GV = cast(Ptr); + GV->setLinkage(llvm::GlobalValue::WeakAnyLinkage); + Better to fix the link clause processing in a different patch, it has nothing to do with the

[PATCH] D64878: [OpenMP] Fix sema check for unified memory case NFC

2019-07-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. It does not look like NFC patch, the functionality has changed. Rename it, please, and a test case that reveals why we need this patch. Also, add a better description of the logic. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64878/new/

[PATCH] D64926: [OpenMP] Fx link clause

2019-07-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. The description does not explain anything. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:2578 } CGM.addUsedGlobal(cast(Ptr)); registerTargetGlobalVariable(VD, cast(Ptr)); Remove this line of code, it is not required

[PATCH] D64592: [OpenMP] Fix target link implementation

2019-07-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:2589 HasRequiresUnifiedSharedMemory))) { +llvm::GlobalValue::LinkageTypes GlobalVarLinkage = + CGM.getLLVMLinkageVarDefinition(VD, false); Currently, I think,

[PATCH] D64889: [OPENMP] getDSA(): handle loop control variables

2019-07-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Thanks for the report, but the fix is not quite correct. I'll fix this myself. I just want to push it to 9.0 release branch ASAP. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64889/new/ https://reviews.llvm.org/D64889 _

[PATCH] D64592: [OpenMP] Fix target link implementation

2019-07-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Fix the name of the patch. It is the patch for declare target, not target. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:2598-2599 + DeviceID, FileID, Line); + OS << CGM.getMangledName(GlobalDecl(VD)) + << llvm

[PATCH] D64592: [OpenMP] Fix declare target link implementation

2019-07-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:2594-2597 + if (!VD->isExternallyVisible()) +getTargetEntryUniqueInfo(CGM.getContext(), + VD->getCanonicalDecl()->getBeginLoc(), +

[PATCH] D64592: [OpenMP] Fix declare target link implementation

2019-07-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. I don't see a single test for static variables. Do we have at least one? If not, add it. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64592/new/ https://reviews.llvm.org/D64592 ___ cfe-comm

[PATCH] D64585: [OpenMP] With nested parallelism, threadprivate variables become shared on outer parallel when appearing in inner parallel copyin clause

2019-07-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Fixed this bug myself to be sure it will be merged with 9.0 release, sorry. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64585/new/ https://reviews.llvm.org/D64585 ___ cfe-com

[PATCH] D64592: [OpenMP] Fix declare target link implementation

2019-07-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:2592-2593 llvm::raw_svector_ostream OS(PtrName); - OS << CGM.getMangledName(GlobalDecl(VD)) << "_decl_tgt_ref_ptr"; + unsigned DeviceID, Line; + unsigned FileID = 0; + OS << CGM.

[PATCH] D64592: [OpenMP] Fix declare target link implementation

2019-07-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. LG with a nit. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:2595 +unsigned DeviceID, Line; +unsigned FileID = 0; +getTargetEntryUniqueInfo(CGM.getContext(), No need to initialize FileID. Repository: rC Clang

[PATCH] D64765: [OPENMP]Add support for analysis of firstprivate variables.

2019-07-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev marked an inline comment as done. ABataev added inline comments. Comment at: include/clang/AST/OpenMPClause.h:2102-2103 child_range used_children() { -return child_range(child_iterator(), child_iterator()); +return child_range(reinterpret_cast(varlist_begin()),

[PATCH] D64765: [OPENMP]Add support for analysis of firstprivate variables.

2019-07-22 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366689: [OPENMP]Add support for analysis of firstprivate variables. (authored by ABataev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHAN

[PATCH] D65106: [OPENMP]Add support for analysis of reduction variables.

2019-07-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added a reviewer: NoQ. Herald added subscribers: jdoerfert, guansong. Herald added a project: clang. Reduction variables are the variables, for which the private copies must be created in the OpenMP regions. Then they are initialized with the predefined value

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

2019-07-23 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGDecl.cpp:2533 + CodeGenFunction *CGF) { + if (!LangOpts.OpenMP || LangOpts.OpenMPSimd || + (!LangOpts.EmitAllDecls && !D->isUsed())) Why do we need to emit it f

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

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

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

2019-07-23 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:2110 + /// Emit code for the user defined mapper construct. + void emitUserDefinedMapper(const OMPDeclareMapperDecl *D, + CodeGenFunction *CGF = nullptr) override; -

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

2019-07-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:2110 + /// Emit code for the user defined mapper construct. + void emitUserDefinedMapper(const OMPDeclareMapperDecl *D, + CodeGenFunction *CGF = nullptr) override; -

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

2019-07-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:2110 + /// Emit code for the user defined mapper construct. + void emitUserDefinedMapper(const OMPDeclareMapperDecl *D, + CodeGenFunction *CGF = nullptr) override; -

[PATCH] D64375: [OpenMP][Docs] Provide implementation status details

2019-07-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D64375#1601163 , @jdoerfert wrote: > I'll add @Hahnfeld comments, anything else? If not, can someone approve this > and we do separate reviews for improvements? Update revision and I'll approve it. Repository: rG LLVM Git

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

2019-07-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:2110 + /// Emit code for the user defined mapper construct. + void emitUserDefinedMapper(const OMPDeclareMapperDecl *D, + CodeGenFunction *CGF = nullptr) override; -

[PATCH] D65106: [OPENMP]Add support for analysis of reduction variables.

2019-07-26 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL367116: [OPENMP]Add support for analysis of reduction variables. (authored by ABataev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES

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

2019-07-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:815 + /// code generation. + void emitUDMapperArrayInitOrDel(CodeGenFunction &MapperCGF, + llvm::Value *Handle, llvm::Value *BasePtr, Seems to me, this fun

[PATCH] D65341: [OpenMP] Add support for close map modifier in Clang

2019-07-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:7695 Flags &= ~(OMP_MAP_TO | OMP_MAP_FROM | OMP_MAP_ALWAYS | - OMP_MAP_DELETE); + OMP_MAP_DELETE | OMP_MAP_CLOSE); Why? R

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

2019-07-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.h:815 + /// code generation. + void emitUDMapperArrayInitOrDel(CodeGenFunction &MapperCGF, + llvm::Value *Handle, llvm::Value *BasePtr, lildmh wrote: > ABata

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

2019-07-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. Looks good in general, but commit the runtime part at first. Comment at: test/OpenMP/declare_mapper_codegen.cpp:44-48 +// CK0-DAG: store i8* %0, i8** [[HANDLEADDR:%[^,]+]]

[PATCH] D65341: [OpenMP] Add support for close map modifier in Clang

2019-07-29 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65341/new/ https://reviews.llvm.org/D65341 ___ cfe-commits ma

[PATCH] D65341: [OpenMP] Add support for close map modifier in Clang

2019-07-29 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D65341#1604411 , @Hahnfeld wrote: > There's already D55892 with a better set of > tests, including `target enter data` / `target exit data`. Better to merge those two patches into one. Repo

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

2019-07-29 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev 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:%[^,]+]] +// CK0-DAG: store i64 %3, i{{64|3

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

2019-07-29 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev 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:%[^,]+]] +// CK0-DAG: store i64 %3, i{{64|3

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

2019-07-29 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev 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:%[^,]+]] +// CK0-DAG: store i64 %3, i{{64|3

[PATCH] D65461: [OPENMP]Add support for analysis of linear variables and step.

2019-07-30 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added a reviewer: NoQ. Herald added a subscriber: guansong. Herald added a project: clang. Added support for basic analysis of the linear variables and linear step expression. Linear loop iteration variables must be excluded from this analysis, only non-loop

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

2019-07-30 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Thanks, looks good. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59474/new/ https://reviews.llvm.org/D59474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[PATCH] D65341: [OpenMP] Add support for close map modifier in Clang

2019-08-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. LG Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65341/new/ https://reviews.llvm.org/D65341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[PATCH] D64943: [Clang][OpenMP offload] Eliminate use of OpenMP linker script

2019-08-05 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Driver/Action.h:74 OffloadUnbundlingJobClass, +OffloadWrapperJobClass, Do we really need this new kind of job here, can we use bundler instead? Comment at: clang/lib/Code

[PATCH] D65819: [Driver][Bundler] Improve bundling of object files.

2019-08-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added reviewers: yaxunl, tra, jlebar, hfinkel. Herald added a reviewer: jdoerfert. Herald added a project: clang. Previously, object files were bundled using partial linking. It resulted in the following structure of the bundled objects: clang-offload-bund

[PATCH] D64943: [Clang][OpenMP offload] Eliminate use of OpenMP linker script

2019-08-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/tools/clang-offload-wrapper/ClangOffloadWrapper.cpp:69 + + using MemoryBuffersVector = SmallVectorImpl>; + Why not `ArrayRef`? Comment at: clang/tools/clang-offload-wrapper/ClangOffloadWrapper.c

[PATCH] D65819: [Driver][Bundler] Improve bundling of object files.

2019-08-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D65819#1617736 , @Hahnfeld wrote: > Can you detail what "incorrect linking" means? AFAIK the additional sections > were just bloating the executable, but how do they affect correctness? > > Will this patch change the ability to

[PATCH] D65835: [OpenMP] Fix map/is_device_ptr with DSA on combined directive

2019-08-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. `is_device_ptr` can be considered as a kind of mapping clause (see 2.19.7 Data-Mapping Attribute Rules, Clauses, and Directives), so, I assume, clang correct here in terms of OpenMP 4.5. Thus, I would not call this a "fix", this is just a new feature from OpenMP 5.0. P

[PATCH] D65461: [OPENMP]Add support for analysis of linear variables and step.

2019-08-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 213888. ABataev added a comment. Rebase Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65461/new/ https://reviews.llvm.org/D65461 Files: include/clang/AST/OpenMPClause.h lib/AST/OpenMPClause.cpp lib/Sema/SemaOpenMP.cpp

[PATCH] D64943: [Clang][OpenMP offload] Eliminate use of OpenMP linker script

2019-08-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/tools/clang-offload-wrapper/ClangOffloadWrapper.cpp:226 +// Add this function to global destructors. +appendToGlobalDtors(M, Func, 0); + } sdmitriev wrote: > vzakhari wrote: > > FYI, llvm.global_dtors does

[PATCH] D65835: [OpenMP] Fix map/is_device_ptr with DSA on combined directive

2019-08-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/target_parallel_for_is_device_ptr_messages.cpp:93 ; -#pragma omp target parallel for private(ps) is_device_ptr(ps) // expected-error{{private variable cannot be in a is_device_ptr clause in '#pragma omp target

[PATCH] D65835: [OpenMP] Fix map/is_device_ptr with DSA on combined directive

2019-08-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. > Maybe, but I haven't found any statement in either version that states that > map restrictions apply to is_device_ptr. `is_device_ptr` is a kind of mapping clause. I assume we can extend the restrictions for `map` clause to this clause too. > Another question is whet

[PATCH] D65835: [OpenMP] Fix map/is_device_ptr with DSA on combined directive

2019-08-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. > I should have reported that the current implementation isn't complete for > OpenMP 4.5. For example, on target teams, reduction(+:x) map(x) is an error > but not map(x) reduction(+:x). So there are bugs to fix, and maybe this will > evolve into multiple patches, but I

[PATCH] D65835: [OpenMP] Fix map/is_device_ptr with DSA on combined directive

2019-08-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D65835#1619549 , @jdenny wrote: > In D65835#1619526 , @ABataev wrote: > > > > Maybe, but I haven't found any statement in either version that states > > > that map restrictions apply to

[PATCH] D65835: [OpenMP] Fix map/is_device_ptr with DSA on combined directive

2019-08-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/target_parallel_for_is_device_ptr_messages.cpp:93 ; -#pragma omp target parallel for private(ps) is_device_ptr(ps) // expected-error{{private variable cannot be in a is_device_ptr clause in '#pragma omp target

[PATCH] D65835: [OpenMP] Fix map/is_device_ptr with DSA on combined directive

2019-08-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/target_parallel_for_is_device_ptr_messages.cpp:93 ; -#pragma omp target parallel for private(ps) is_device_ptr(ps) // expected-error{{private variable cannot be in a is_device_ptr clause in '#pragma omp target

[PATCH] D65835: [OpenMP] Fix map/is_device_ptr with DSA on combined directive

2019-08-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/target_parallel_for_is_device_ptr_messages.cpp:93 ; -#pragma omp target parallel for private(ps) is_device_ptr(ps) // expected-error{{private variable cannot be in a is_device_ptr clause in '#pragma omp target

[PATCH] D65835: [OpenMP] Fix map/is_device_ptr with DSA on combined directive

2019-08-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/target_parallel_for_is_device_ptr_messages.cpp:93 ; -#pragma omp target parallel for private(ps) is_device_ptr(ps) // expected-error{{private variable cannot be in a is_device_ptr clause in '#pragma omp target

[PATCH] D65461: [OPENMP]Add support for analysis of linear variables and step.

2019-08-08 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368295: [OPENMP]Add support for analysis of linear variables and step. (authored by ABataev, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM C

[PATCH] D65835: [OpenMP] Fix map/is_device_ptr with DSA on combined directive

2019-08-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D65835#1621168 , @jdenny wrote: > In D65835#1619560 , @ABataev wrote: > > > In D65835#1619549 , @jdenny wrote: > > > > > In D65835#1619526

[PATCH] D64375: [OpenMP][Docs] Provide implementation status details

2019-08-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/docs/OpenMPSupport.rst:222-226 +| device extension | clause: reverse_offload | :good:`done` | D52780 | ++--+

[PATCH] D65819: [Driver][Bundler] Improve bundling of object files.

2019-08-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Additional note. Seems to me, it has something to do with the partial linking. According to ld documentation, it is recommended to use `-Ur` option for partial linking of the C++ object files to resolve global constructors. -Ur For anything other than C++ programs,

[PATCH] D65835: [OpenMP] Fix map/is_device_ptr with DSA on combined directive

2019-08-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. > I want to be sure we're on the same page: For OpenMP 5.0, should we allow > is_device_ptr with the private clauses? Yes, since it is allowed by the standard. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65835/new/ http

[PATCH] D65835: [OpenMP] Fix map/is_device_ptr with DSA on combined directive

2019-08-09 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D65835#1623756 , @kkwli0 wrote: > In D65835#1622042 , @ABataev wrote: > > > > I want to be sure we're on the same page: For OpenMP 5.0, should we allow > > > is_device_ptr with the priva

[PATCH] D65835: [OpenMP] Fix map/is_device_ptr with DSA on combined directive

2019-08-09 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D65835#1623854 , @jdenny wrote: > In D65835#1623814 , @hfinkel wrote: > > > In D65835#1623772 , @ABataev wrote: > > > > > In D65835#1623756

[PATCH] D65835: [OpenMP] Fix map/is_device_ptr with DSA on combined directive

2019-08-09 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D65835#1623883 , @hfinkel wrote: > In D65835#1623814 , @hfinkel wrote: > > > In D65835#1623772 , @ABataev wrote: > > > > > In D65835#1623756

[PATCH] D65835: [OpenMP] Fix map/is_device_ptr with DSA on combined directive

2019-08-09 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D65835#1623939 , @hfinkel wrote: > In D65835#1623903 , @ABataev wrote: > > > In D65835#1623883 , @hfinkel wrote: > > > > > In D65835#1623814

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D65835#1624471 , @jdenny wrote: > I made the following changes, as suggested: > > - Add back restriction for OpenMP < 5.0. > - Remove `is_device_ptr` changes. > > Alexey, you said: > > > Plus, these changes are not enough to s

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D65835#1624610 , @jdenny wrote: > In D65835#1624477 , @ABataev wrote: > > > Try something like `target parallel firstprivate (a) map(a)`. Currently it > > will create a firstprivate copy

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D65835#1624616 , @jdenny wrote: > In D65835#1624615 , @ABataev wrote: > > > This is wrong. It affects all possible combinations and not only fof scalar > > types, all of them are affecte

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D65835#1624619 , @jdenny wrote: > In D65835#1624617 , @ABataev wrote: > > > Target teams private map will produce extra private in target context, > > other constructs either. > > > Here

[PATCH] D65835: [OpenMP] Permit map with DSA on combined directive

2019-08-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D65835#1624629 , @jdenny wrote: > In D65835#1624624 , @ABataev wrote: > > > In D65835#1624619 , @jdenny wrote: > > > > > In D65835#1624617

[PATCH] D65819: [Driver][Bundler] Improve bundling of object files.

2019-08-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Ping. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65819/new/ https://reviews.llvm.org/D65819 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[PATCH] D65819: [Driver][Bundler] Improve bundling of object files.

2019-08-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D65819#1627032 , @Hahnfeld wrote: > In D65819#1617736 , @Hahnfeld wrote: > > > Will this patch change the ability to consume a bundled object file without > > calling the unbundler? Usin

[PATCH] D66143: Don't use std::errc

2019-08-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added reviewers: thakis, rnk. Herald added a project: clang. As noted on Errc.h: // * std::errc is just marked with is_error_condition_enum. This means that // common patters like AnErrorCode == errc::no_such_file_or_directory take // 4 virtual calls ins

[PATCH] D66143: Don't use std::errc

2019-08-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D66143#1627157 , @thakis wrote: > This isn't in a hot codepath, so the virtual calls aren't super important. > > This not working in some libstdc++s is important of course, but llvm's Errc.h > claims "std::error_code works OK o

[PATCH] D66143: Don't use std::errc

2019-08-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. `std::error_code` works correctly, it is `std::make_error_code` leads to something strange in some cases. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66143/new/ https://reviews.llvm.org/D66143 ___

[PATCH] D66143: Don't use std::errc

2019-08-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D66143#1627165 , @thakis wrote: > That's Trusty and Trusty is on 4.8 which we no longer support, right? It is still supported with some extra cmake flags. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D66143: Don't use std::errc

2019-08-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Also, there is a clang unit test that fails because of the same reason. Can I include the changes in this test into this patch too or better to make a separate patch? The test is `unittests/Basic/FileManagerTest.cpp` Repository: rC Clang CHANGES SINCE LAST ACTION

[PATCH] D66143: Don't use std::errc

2019-08-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D66143#1627195 , @thakis wrote: > As far as I know 4.8 is no longer supported. > > In D66143#1627168 , @ABataev wrote: > > > In D66143#1627165 , @

[PATCH] D65819: [Driver][Bundler] Improve bundling of object files.

2019-08-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev marked an inline comment as done. ABataev added a comment. In D65819#1627600 , @Hahnfeld wrote: > In D65819#1627036 , @ABataev wrote: > > > In D65819#1627032 , @Hahnf

[PATCH] D65819: [Driver][Bundler] Improve bundling of object files.

2019-08-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev marked an inline comment as done. ABataev added a comment. In D65819#1627631 , @Hahnfeld wrote: > In D65819#1627620 , @ABataev wrote: > > > In D65819#1627600 , @Hahnf

<    1   2   3   4   5   6   7   8   9   10   >