[PATCH] D38976: [OpenMP] Add implicit data sharing support when offloading to NVIDIA GPUs using OpenMP device offloading

2017-11-20 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. LG Comment at: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:474 CodeGenFunction CGF(CGM, /*suppressNewContext=*/true); CGF.disableDebugInfo(); CGF.StartFunction(GlobalDecl(), Ctx.VoidTy, WST.WorkerFn, *WST.CGFI, {}); ---

[PATCH] D39947: [OpenMP] Stable sort Privates to remove non-deterministic ordering

2017-11-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: rL LLVM https://reviews.llvm.org/D39947 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

[PATCH] D40281: [Clang][OpenMP] New clang/libomptarget map interface: new function signatures, clang-side

2017-11-21 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: rL LLVM https://reviews.llvm.org/D40281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-03-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/AST/StmtOpenMP.cpp:2362 +const HelperExprs &Exprs) { + this->LoopDirCrParmV = new LoopDirCrParam(C, StartLoc, EndLoc, CollapsedNum, +Clauses, AssociatedStmt, Exprs);

[PATCH] D146418: Support for OpenMP 5.0 sec 2.12.7 - Declare Target initializer expressions

2023-03-20 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:2093-2115 +void ParseImplicitDeclareTargetAttr(Decl *TargetDecl) { + if (TargetDecl && TargetDecl->hasAttr() && + isa(TargetDecl)) { +VarDecl *TargetVarDecl = cast(TargetDecl); +Expr *Ex = Targ

[PATCH] D146418: Support for OpenMP 5.0 sec 2.12.7 - Declare Target initializer expressions

2023-03-20 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:2107 + DeclVar->addAttr(TargetDecl->getAttr()); + ParseImplicitDeclareTargetAttr(DeclVar); +} RitanyaB wrote: > ABataev wrote: > > Try to avoid recursi

[PATCH] D146418: Support for OpenMP 5.0 sec 2.12.7 - Declare Target initializer expressions

2023-03-23 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:2093-2115 +void ParseImplicitDeclareTargetAttr(Decl *TargetDecl) { + if (TargetDecl && TargetDecl->hasAttr() && + isa(TargetDecl)) { +VarDecl *TargetVarDecl = cast(TargetDecl); +Expr *Ex = Targ

[PATCH] D146418: Support for OpenMP 5.0 sec 2.12.7 - Declare Target initializer expressions

2023-03-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:2093-2115 +void ParseImplicitDeclareTargetAttr(Decl *TargetDecl) { + if (TargetDecl && TargetDecl->hasAttr() && + isa(TargetDecl)) { +VarDecl *TargetVarDecl = cast(TargetDecl); +Expr *Ex = Targ

[PATCH] D146418: Support for OpenMP 5.0 sec 2.12.7 - Declare Target initializer expressions

2023-03-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:2093-2115 +void ParseImplicitDeclareTargetAttr(Decl *TargetDecl) { + if (TargetDecl && TargetDecl->hasAttr() && + isa(TargetDecl)) { +VarDecl *TargetVarDecl = cast(TargetDecl); +Expr *Ex = Targ

[PATCH] D144993: [OpenMP]Emit captured decls for target data if no devices were specified.

2023-02-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added a reviewer: jhuber6. Herald added subscribers: guansong, yaxunl. Herald added a project: All. ABataev requested review of this revision. Herald added a reviewer: jdoerfert. Herald added a subscriber: sstefan1. Herald added a project: clang. If use_devic

[PATCH] D144993: [OpenMP] Emit captured decls for target data if no devices were specified.

2023-02-28 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGacc30a169eab: [OpenMP]Emit captured decls for target data if no devices were specified. (authored by ABataev). Repository: rG LLVM Github Monorepo

[PATCH] D145093: Add map info for dereference pointer.

2023-03-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/target_map_deref_array_codegen.cpp:17 +(*t1d)[j] = 1; + #pragma omp target map(to: (*t1d)[0:3]) +(*t1d)[2] = 2; Is this correct at all? This is not a pointer to the array, it is an array of po

[PATCH] D145093: Add map info for dereference pointer.

2023-03-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/target_map_deref_array_codegen.cpp:17 +(*t1d)[j] = 1; + #pragma omp target map(to: (*t1d)[0:3]) +(*t1d)[2] = 2; jyu2 wrote: > ABataev wrote: > > Is this correct at all? This is not a pointer to

[PATCH] D145093: Add map info for dereference pointer.

2023-03-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. What result produces `map(a[0][:3]`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145093/new/ https://reviews.llvm.org/D145093 ___ cfe-commits mailing list cfe-commits@lists.llv

[PATCH] D145093: Add map info for dereference pointer.

2023-03-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D145093#4164854 , @jyu2 wrote: > In D145093#4164528 , @ABataev wrote: > >> What result produces `map(a[0][:3]`? > > Yes, that would be another way to fix the runtime problem. However t

[PATCH] D145093: Add map info for dereference pointer.

2023-03-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D145093#4164877 , @jyu2 wrote: >> I mean we shall emit the same mapping for `(*a)[:3]` and for `a[0][:3]` > > Yes I mean emit (*a)[:3] as a[0][:3] > > The difficulty is during the process array section of > OMPArraySectionExpr

[PATCH] D145093: Add map info for dereference pointer.

2023-03-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:7487-7497 + auto TNext = Next; + bool IsVarDerefAssoWithArray = false; + if (UO && UO->getOpcode() == UO_Deref) +for (; TNext != CE; TNext = std::next(TNext)) + if (is

[PATCH] D145093: Add map info for dereference pointer.

2023-03-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:7487-7497 + auto TNext = Next; + bool IsVarDerefAssoWithArray = false; + if (UO && UO->getOpcode() == UO_Deref) +for (; TNext != CE; TNext = std::next(TNext)) + if (is

[PATCH] D145093: Add map info for dereference pointer.

2023-03-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:7487-7497 + auto TNext = Next; + bool IsVarDerefAssoWithArray = false; + if (UO && UO->getOpcode() == UO_Deref) +for (; TNext != CE; TNext = std::next(TNext)) + if (is

[PATCH] D145093: Add map info for dereference pointer.

2023-03-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:7489-7493 + if (UO && UO->getOpcode() == UO_Deref) +if (isa(Last->getAssociatedExpression()) || +isa(Last->getAssociatedExpression()) || +isa(Last->getAssociatedE

[PATCH] D145093: Add map info for dereference pointer.

2023-03-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:7489-7493 + if (UO && UO->getOpcode() == UO_Deref) +if (isa(Last->getAssociatedExpression()) || +isa(Last->getAssociatedExpression()) || +isa(Last->getAssociatedE

[PATCH] D145093: Add map info for dereference pointer.

2023-03-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:7489-7493 + if (UO && UO->getOpcode() == UO_Deref) +if (isa(Last->getAssociatedExpression()) || +isa(Last->getAssociatedExpression()) || +isa(Last->getAssociatedE

[PATCH] D145093: Add map info for dereference pointer.

2023-03-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:7489-7493 + if (UO && UO->getOpcode() == UO_Deref) +if (isa(Last->getAssociatedExpression()) || +isa(Last->getAssociatedExpression()) || +isa(Last->getAssociatedE

[PATCH] D145514: [OPENMP]Fix PR59947: "Partially-triangular" loop collapse crashes.

2023-03-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added reviewers: jdoerfert, Meinersbur, mikerice. Herald added subscribers: guansong, yaxunl. Herald added a project: All. ABataev requested review of this revision. Herald added subscribers: openmp-commits, sstefan1. Herald added projects: clang, OpenMP. The

[PATCH] D145514: [OPENMP]Fix PR59947: "Partially-triangular" loop collapse crashes.

2023-03-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 503114. ABataev added a comment. Address comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145514/new/ https://reviews.llvm.org/D145514 Files: clang/lib/Sema/SemaOpenMP.cpp clang/test/OpenMP/for_non_re

[PATCH] D145093: [OpenMP] Add map info for dereference pointer.

2023-03-08 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: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145093/new/ https://reviews.llvm.org/D145093 ___

[PATCH] D145514: [OPENMP]Fix PR59947: "Partially-triangular" loop collapse crashes.

2023-03-08 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0cfe5ae0b62a: [OPENMP]Fix PR59947: "Partially-triangular" loop collapse crashes. (authored by ABataev). Repository: rG LLVM Github Monorepo CHANG

[PATCH] D146000: [OpenMP]Skip generating this[:1] map info for non-member variable.

2023-03-14 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: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146000/new/ https://reviews.llvm.org/D146000 ___

[PATCH] D153369: [OpenMP] Always apply target declarations to canonical definitions

2023-06-20 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:23099 +CD->addAttr(A); if (ASTMutationListener *ML = Context.getASTMutationListener()) ML->DeclarationMarkedOpenMPDeclareTarget(D, A); Need to use M

[PATCH] D153369: [OpenMP] Always apply target declarations to canonical definitions

2023-06-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Did you try instead fix the OMPDeclareTargetDeclAttr::getActiveAttr() function to make it look through all the declarations and return the attribute from the first found instead of adding a new attribute? Comment at: clang/lib/Sema/SemaOpenMP.cpp:2299

[PATCH] D153369: [OpenMP] Always apply target declarations to canonical definitions

2023-06-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D153369#4452008 , @jhuber6 wrote: > In D153369#4451993 , @ABataev wrote: > >> Did you try instead fix the OMPDeclareTargetDeclAttr::getActiveAttr() >> function to make it look through

[PATCH] D153556: [OPENMP52] Initial support for doacross clause.

2023-06-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Parse/ParseOpenMP.cpp:4415-4439 + } else if (Kind == OMPC_doacross) { +// Handle dependence type for the doacross clause. +ColonProtectionRAIIObject ColonRAII(*this); +Data.ExtraModifier = getOpenMPSimpleClauseType

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-06-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Sema/Sema.h:11094 + bool checkLastPrivateForMappedDirectives(ArrayRef Clauses); + bool mapLoopConstruct(llvm::SmallVector *ClausesWithoutBind, const member function? Add a comment ==

[PATCH] D153369: [OpenMP] Always apply target declarations to canonical definitions

2023-06-27 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 with a nit Comment at: clang/lib/Sema/SemaOpenMP.cpp:22991 ML->DeclarationMarkedOpenMPDeclareTarget(ND, A); + checkDeclIsAllowedInOpenMPTarget(nullptr, ND, Loc);

[PATCH] D153883: [Clang][OpenMP] Enable use of __kmpc_alloc_shared for VLAs defined in AMD GPU offloaded regions

2023-06-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Add the runtime test? Comment at: clang/lib/CodeGen/CGDecl.cpp:587 +std::pair AddrSizePair; +KmpcAllocFree(std::pair AddrSizePair) +: AddrSizePair(AddrSizePair) {} Better to pass it as const reference

[PATCH] D153883: [Clang][OpenMP] Enable use of __kmpc_alloc_shared for VLAs defined in AMD GPU offloaded regions

2023-06-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:1085 } - for (const auto *VD : I->getSecond().EscapedVariableLengthDecls) { -// Use actual memory size of the VLA object including the padding jhuber6 wrote: > doru1004 wr

[PATCH] D153883: [Clang][OpenMP] Enable use of __kmpc_alloc_shared for VLAs defined in AMD GPU offloaded regions

2023-06-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:1603 +// deallocation call of __kmpc_free_shared() is emitted later. +if (getLangOpts().OpenMP && getTarget().getTriple().isAMDGCN()) { + // Emit call to __kmpc_alloc_shared() instead of the allo

[PATCH] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-06-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9818 + D.hasClausesOfKind() || + (CGM.getLangOpts().OpenMP >= 51 && D.getDirectiveKind() == OMPD_target && + D.hasClausesOfKind()); What if D is combined target direc

[PATCH] D153556: [OPENMP52] Initial support for doacross clause.

2023-06-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Parse/ParseOpenMP.cpp:4415-4439 + } else if (Kind == OMPC_doacross) { +// Handle dependence type for the doacross clause. +ColonProtectionRAIIObject ColonRAII(*this); +Data.ExtraModifier = getOpenMPSimpleClauseType

[PATCH] D153321: [OpenMP] Fix lvalue reference type generation in untied task loop

2023-06-28 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: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153321/new/ https://reviews.llvm.org/D153321 ___

[PATCH] D153883: [Clang][OpenMP] Enable use of __kmpc_alloc_shared for VLAs defined in AMD GPU offloaded regions

2023-06-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D153883#4456342 , @tianshilei1992 wrote: > I think it's better to just limit it to AMDGPU for now. I rather doubt this is a good decision. Better to support for all targets. NVPTX supports(ed) (IIRC) static allocation and in

[PATCH] D153556: [OPENMP52] Initial support for doacross clause.

2023-06-29 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Upload full context Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153556/new/ https://reviews.llvm.org/D153556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[PATCH] D153556: [OPENMP52] Initial support for doacross clause.

2023-06-29 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:20871 TotalDepCount.getZExtValue()); + if ((DepKind == OMPC_DEPEND_sink || DepKind == OMPC_DEPEND_source) && Remove this new line Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D153556: [OPENMP52] Initial support for doacross clause.

2023-06-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 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153556/new/ https://reviews.llvm.org/D153556 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D153321: [OpenMP] Fix lvalue reference type generation in untied task loop

2023-06-29 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG08513cbea4dc: [OpenMP] Fix lvalue reference type generation in untied task loop (authored by eastb233, committed by ABataev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-30 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:589 +: AddrSizePair(AddrSizePair) {} +void Emit(CodeGenFunction &CGF, Flags Flags) override { + CGOpenMPRuntimeGPU &RT = Name of the variable hides the type, potential warnin

[PATCH] D154180: [OPENMP52] Codegen support for doacross clause.

2023-06-30 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:11382-11383 void CGOpenMPRuntime::emitDoacrossOrdered(CodeGenFunction &CGF, - const OMPDependClause *C) { + const

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-30 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:1605-1609 +(CGM.getContext().getTargetInfo().getTriple().isAMDGPU() || + CGM.getContext().getTargetInfo().getTriple().isNVPTX())) { + CGOpenMPRuntimeGPU &RT = + *(static_cast(&CG

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-30 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:590-591 +void Emit(CodeGenFunction &CGF, Flags EmissionFlags) override { + CGOpenMPRuntimeGPU &RT = + *(static_cast(&CGF.CGM.getOpenMPRuntime())); + RT.getKmpcFreeShared(CGF, AddrSizePa

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-30 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.h:2806 + /// Return true if all the emissions for the VLA size have occured. + bool hasVLASize(const VariableArrayType *type); + doru1004 wrote: > ABataev wrote: > > 1. Is it possible

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-30 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:2168 +ElementType = VLAType->getElementType(); +llvm::Value *VLASize = VLASizeMap[VLAType->getSizeExpr()]; +if (!VLASize) Use VLASizeMap.find() instead

[PATCH] D153883: [Clang][OpenMP] Delay emission of __kmpc_alloc_shared for escaped VLAs

2023-06-30 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.h:2806 + /// Return true if all the emissions for the VLA size have occured. + bool hasVLASize(const VariableArrayType *type); + doru1004 wrote: > ABataev wrote: > > doru1004 wrote: >

[PATCH] D154180: [OPENMP52] Codegen support for doacross clause.

2023-06-30 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:11401-11402 llvm::Value *Args[] = { - emitUpdateLocation(CGF, C->getBeginLoc()), - getThreadID(CGF, C->getBeginLoc()), + RT.emitUpdateLocation(CGF, C->getBeginLoc()), + RT.getT

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-04-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:6124 BindKind = BC->getBindKind(); + // First check CancelRegion which is then used in checkNestingOfRegions. Remove this new line Comment at: clang/lib/Sema/SemaO

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-04-12 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:9792 + "construct">; +def error_loop_reduction_clause : Error< + "reduction clause not handled with '#pragma omp loop bind(teams)'">; err_omp_... Comm

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-04-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D144634#4272857 , @koops wrote: > 1. Adding semantic test clang/test/OpenMP/loop_bind_messages.cpp. > 2. Changes suggested by Alexey. > 3. >Why need to drop bind clause here? The new Directives to which loop > directive is bei

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-04-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Also, add AST printing tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144634/new/ https://reviews.llvm.org/D144634 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D146418: Support for OpenMP 5.0 sec 2.12.7 - Declare Target initializer expressions

2023-05-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:14475-14477 + VD->hasGlobalStorage()) { +ActOnOpenMPDeclareTargetInitializer(D); + } Remove braces Comment at: clang/lib/Sema/SemaOpenMP.cpp:23091 +c

[PATCH] D151356: [OpenMP] Fix transformed loop's var privacy

2023-05-24 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: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151356/new/ https://reviews.llvm.org/D151356 ___

[PATCH] D146418: Support for OpenMP 5.0 sec 2.12.7 - Declare Target initializer expressions

2023-05-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:23121-23122 + void VisitExpr(const Expr *Ex) { +for (Expr::const_child_iterator it = Ex->child_begin(); + it != Ex->child_end(); ++it) { + Visit(*it); `for (const Expr *Chi

[PATCH] D151517: Fix couple of problems in uses_allocators clause.

2023-05-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Could you split it into 3 separate patches? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151517/new/ https://reviews.llvm.org/D151517 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D151517: Fix wrong error message when compiling C souce code

2023-05-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. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151517/new/ https://reviews.llvm.org/D151517 ___

[PATCH] D151576: Fix runtime crash inside __kmpc_init_allocator

2023-05-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. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151576/new/ https://reviews.llvm.org/D151576 ___

[PATCH] D146418: Support for OpenMP 5.0 sec 2.12.7 - Declare Target initializer expressions

2023-05-30 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:23136 + TargetVarDecl->hasInit() && TargetVarDecl->hasGlobalStorage()) { +if (auto *Ex = TargetVarDecl->getInit()) + Visit(Ex); Better to expand `auto` here =

[PATCH] D146418: Support for OpenMP 5.0 sec 2.12.7 - Declare Target initializer expressions

2023-05-30 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:23106 +class GlobalDeclRefChecker final +: public ConstStmtVisitor { + SmallVector DeclVector; Use just a StmtVisitor, if you still dropping const modifier. Comment a

[PATCH] D146418: Support for OpenMP 5.0 sec 2.12.7 - Declare Target initializer expressions

2023-05-30 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:23127 + /// OMPDeclareTargetDeclAttr, and has global storage in the DeclVector. Pop + /// each Decl one at a time and use the inherited Visit functions to look for + /// DeclRefExpr. F

[PATCH] D151743: [OMP] Fix compiler assert "DeclRefExpr for Decl not entered in LocalDeclMap?"

2023-05-30 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: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151743/new/ https://reviews.llvm.org/D151743 ___

[PATCH] D146418: Support for OpenMP 5.0 sec 2.12.7 - Declare Target initializer expressions

2023-05-31 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/D146418/new/ https://reviews.llvm.org/D146418 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-06-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Sema/Sema.h:11083 + bool CheckLastPrivateForMappedDirectives(ArrayRef Clauses); + `checkLastPrivateForMappedDirectives` Comment at: clang/lib/AST/StmtPrinter.cpp:745-746 + OpenM

[PATCH] D144015: [OpenMP]Fix PR55970: Miscompile of collapse(3) with non-rectangular loop nest.

2023-02-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added a reviewer: mikerice. Herald added subscribers: guansong, yaxunl. Herald added a project: All. ABataev requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: openmp-commits, sstefan1. Herald added projects: clang

[PATCH] D144015: [OpenMP]Fix PR55970: Miscompile of collapse(3) with non-rectangular loop nest.

2023-02-14 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGddde06906be1: [OpenMP]Fix PR55970: Miscompile of collapse(3) with non-rectangular loop nest. (authored by ABataev). Repository: rG LLVM Github Mon

[PATCH] D144616: Skip generating this[:1] map info for non-member variable.

2023-02-23 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: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144616/new/ https://reviews.llvm.org/D144616 ___

[PATCH] D146418: Support for OpenMP 5.0 sec 2.12.7 - Declare Target initializer expressions

2023-05-09 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:14473 + // directive and has static storage duration. + if (auto *VD = dyn_cast_or_null(D); + LangOpts.OpenMP && VD && VD->hasAttr() && В is already checked that is not null

[PATCH] D146418: Support for OpenMP 5.0 sec 2.12.7 - Declare Target initializer expressions

2023-05-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:23106-23107 + it != Ex->child_end(); ++it) { + if (isa(*it)) +VisitExpr(dyn_cast(*it)); + if (isa(*it)) Why just a regular Visit does not work here? Plus, isa + dyn

[PATCH] D150394: [OpenMP 5.2] Deprecate MINUS (-) operator on reduction clauses

2023-05-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:10487-10488 "a reduction list item with incomplete type %0">; +def err_omp_reduction_minus_type : Error< + "a reduction list item with minus(-) operator is not supported">; +def warn_o

[PATCH] D146418: Support for OpenMP 5.0 sec 2.12.7 - Declare Target initializer expressions

2023-05-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Sema/Sema.h:11329 + /// directive. + void ActOnOpenMPImplicitDeclareTarget(Decl *D); + Do I understand correctly, that the variable itself is marked explicitly, but the initializer shall be marked

[PATCH] D150394: [OpenMP 5.2] Deprecate MINUS (-) operator on reduction clauses

2023-05-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:10490 +def warn_omp_minus_in_reduction_deprecated : Warning< + "minus(-) operator for reductions is deprecated; use an user defined reduction instead">, + InGroup; mdfa

[PATCH] D150394: [OpenMP 5.2] Deprecate MINUS (-) operator on reduction clauses

2023-05-17 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 Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:10487-10488 "a reduction list item with incomplete type %0">; +def err_omp_reduction_minus_type : Error<

[PATCH] D148805: [Clang][OpenMP] Avoid emitting a __kmpc_alloc_shared for implicit casts which do not have their address taken

2023-04-20 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:448 return; -if (E->getCastKind() == CK_ArrayToPointerDecay) { - const bool SavedAllEscaped = AllEscaped; I think you need to check that the array is allocated in

[PATCH] D146418: Support for OpenMP 5.0 sec 2.12.7 - Declare Target initializer expressions

2023-04-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:14467-14468 + // directive and has static storage duration. + if (D && D->hasAttr() && isa(D)) { +if ((cast(D))->hasGlobalStorage()) + ActOnOpenMPImplicitDeclareTarget(D); --

[PATCH] D144634: [Clang][OpenMP] Support for Code Generation of loop bind clause

2023-05-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D144634#4308872 , @koops wrote: > 1. Taken care of some of the comments by Alexey. > 2. Added extra tests of loop_bind_messages.cpp > > However, generic_loop_messages.cpp & generic_loop_ast_print.cpp are present > and provide

[PATCH] D139166: [OPENMP51] Codegen support for error directive.

2022-12-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.h:334 llvm::Value *emitUpdateLocation(CodeGenFunction &CGF, SourceLocation Loc, - unsigned Flags = 0); + unsigned Flags = 0, bool Emit

[PATCH] D139166: [OPENMP51] Codegen support for error directive.

2022-12-08 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: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139166/new/ https://reviews.llvm.org/D139166 ___

[PATCH] D131830: [OpenMP] Clang Support for taskwait nowait clause

2022-12-08 Thread Alexey Bataev via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG100dfe7a8ad3: [OpenMP] Clang Support for taskwait nowait clause (authored by koops, committed by ABataev). Herald added projects: clang, OpenMP. Hera

[PATCH] D138614: [Clang][OpenMP][AMDGPU] Fix capture of variably modified type alias in teams distribute

2022-12-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:246-249 + if (!IsVMTTy) +EscapedParameters.insert(VD); + else if (!IsForCombinedParallelRegion) +return; Also, can you make it specific t

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:2697-2706 + for (OMPDeclareVariantAttr *A : + Callee->specific_attrs()) { +auto *DeclRefVariant = cast(A->getVariantFuncRef()); +auto *VariantFD = cast(DeclRefVariant->getDecl(

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:2704 +VariantFD->getMostRecentDecl()); +if (!DevTy || *DevTy == OMPDeclareTargetDeclAttr::DT_Host) + HasHostFunctionVariant = true; doru1004 wrote: > ABataev

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:2683 + OMPDeclareTargetDeclAttr::getDeviceType(VariantFD->getMostRecentDecl()); +if (!DevTy || *DevTy == OMPDeclareTargetDeclAttr::DT_Host) + return true; Do you have a test

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:2683 + OMPDeclareTargetDeclAttr::getDeviceType(VariantFD->getMostRecentDecl()); +if (!DevTy || *DevTy == OMPDeclareTargetDeclAttr::DT_Host) + return true; doru1004 wrote: >

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/declare_target_nohost_variant_messages.cpp:16 +#pragma omp declare target enter(fun2) device_type(nohost) +#pragma omp declare variant(host_function) match(device={kind(host)}) +void fun2() {} You mean

[PATCH] D140155: [Clang][OpenMP] Allow host call to nohost function with host variant

2022-12-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 Comment at: clang/test/OpenMP/declare_target_nohost_variant_messages.cpp:16 +#pragma omp declare target enter(fun2) device_type(nohost) +#pragma omp declare variant(host

[PATCH] D27818: [OpenMP] Sema and parsing for 'target teams' pragma

2016-12-15 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 https://reviews.llvm.org/D27818 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D27821: [OpenMP] support is_device_ptr clause with 'target parallel' pragma

2016-12-15 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 https://reviews.llvm.org/D27821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D27794: Make some diagnostic tests C++11 clean

2016-12-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. LG for OpenMP part https://reviews.llvm.org/D27794 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28015: [OpenMP] Sema and parsing for 'target teams distribute' pragma

2016-12-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. LG https://reviews.llvm.org/D28015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28124: [OpenMP] Code cleanup for NVPTX OpenMP codegen

2016-12-28 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. Function names must start with a lower case letter. LG for other changes https://reviews.llvm.org/D28124 ___ cfe-commits mailing list cfe-commi

[PATCH] D28125: [OpenMP] Update target codegen for NVPTX device.

2016-12-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp:248 + Address WorkFn = CGF.CreateTempAlloca( + CGF.Int8PtrTy, CharUnits::fromQuantity(8), /*Name*/ "work_fn"); + Address ExecStatus = I don't like the idea of using absolute nu

[PATCH] D28124: [OpenMP] Code cleanup for NVPTX OpenMP codegen

2016-12-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. LG https://reviews.llvm.org/D28124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28125: [OpenMP] Update target codegen for NVPTX device.

2016-12-28 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 https://reviews.llvm.org/D28125 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D28145: [OpenMP] Basic support for a parallel directive in a target region on an NVPTX device.

2016-12-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:114 /// \brief Get the name of the capture helper. - StringRef getHelperName() const override { return ".omp_outlined."; } + StringRef getHelperName() const override { return "__omp_outlined__"; } -

<    14   15   16   17   18   19   20   21   22   23   >