[PATCH] D137313: [NFC] Remove redundant loads when has_device_addr is used.

2022-11-04 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/D137313/new/ https://reviews.llvm.org/D137313 ___

[PATCH] D127855: [OpenMP] Basic parse and sema support for modifiers in order clause

2022-11-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:10634 "OpenMP constructs may not be nested inside an atomic region">; +def err_omp_prohibited_region_order +: Error<"construct %0 not allowed in a region associated with a directive

[PATCH] D137765: [NFC] Fixing a comment and some indentations

2022-11-10 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/D137765/new/ https://reviews.llvm.org/D137765 ___

[PATCH] D127855: [OpenMP] Basic parse and sema support for modifiers in order clause

2022-11-11 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/D127855/new/ https://reviews.llvm.org/D127855 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D137851: [OPENMP]Initial support for at clause

2022-11-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/OpenMPClause.h:1613-1615 + /// Sets the location of '('. + void setLParenLoc(SourceLocation Loc) { LParenLoc = Loc; } + Make it private Comment at: clang/include/clang/Parse/P

[PATCH] D137851: [OPENMP]Initial support for at clause

2022-11-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Parse/Parser.h:3302 + void ParseOpenMPClauses(OpenMPDirectiveKind DKind, + SmallVector *Clauses, + SourceLocation Loc); `SmallVectorImpl &` ===

[PATCH] D137851: [OPENMP]Initial support for at clause

2022-11-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Sema/Sema.h:11293 + SourceLocation EndLoc, + bool InExContext = true); /// Called on well-formed '\#pragma omp barrier'.

[PATCH] D137851: [OPENMP]Initial support for at clause

2022-11-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Parse/ParseOpenMP.cpp:2168 +Actions.ActOnOpenMPErrorDirective(Clauses, StartLoc, SourceLocation(), + /*InExcontext = */ false); +break; InExContext ===

[PATCH] D137851: [OPENMP]Initial support for at clause

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

[PATCH] D138159: [Clang][OpenMP] Add enter clause to declare target for OpenMP 5.2

2022-11-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Parse/ParseOpenMP.cpp:1811 + // clause. + if (getLangOpts().OpenMP >= 52 && ClauseName.str() == "to") { +Diag(Tok, diag::err_omp_declare_target_unexpected_to_clause); Do you really need `.str(

[PATCH] D138159: [Clang][OpenMP] Add enter clause to declare target for OpenMP 5.2

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

[PATCH] D138217: [OpenMP] Initial parsing and semantic analysis support for 'strict' modifier with 'grainsize' clause of 'taskloop' construct

2022-11-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. 1. Add full diff context 2. Add unsuccessful tests for the modifier (parsing and sema) Comment at: clang/lib/Parse/ParseOpenMP.cpp:3811 +// Parse optional ':' +auto Modifier = getOpenMPSimpleClauseType( +Kind, Tok.isAnnotation() ? "" :

[PATCH] D138227: [OPENMP]Initial support for severity clause

2022-11-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: llvm/include/llvm/Frontend/OpenMP/OMP.td:538-539 let allowedClauses = [ -VersionedClause +VersionedClause, +VersionedClause ]; Add a version where these clauses were introduced Repository: rG LLVM G

[PATCH] D138217: [OpenMP] Initial parsing and semantic analysis support for 'strict' modifier with 'grainsize' clause of 'taskloop' construct

2022-11-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Looks like you dud not add corresponding definitions to llvm/Frontend CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138217/new/ https://reviews.llvm.org/D138217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D138227: [OPENMP]Initial support for severity clause

2022-11-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/error_message.cpp:85 return T(); } Di you have a test for tge directive with 2 or more severity clauses? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D138217: [OpenMP] Initial parsing and semantic analysis support for 'strict' modifier with 'grainsize' clause of 'taskloop' construct

2022-11-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D138217#3934786 , @mdfazlay wrote: > In D138217#3934677 , @ABataev wrote: > >> Looks like you dud not add corresponding definitions to llvm/Frontend > > Do you mean in //llvm/include/ll

[PATCH] D138227: [OPENMP]Initial support for severity clause

2022-11-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/error_ast_print.cpp:16 // CHECK: static int a; -// CHECK-NEXT: #pragma omp error at(execution) +// CHECK-NEXT: #pragma omp error at(execution) severity(fatal // CHECK-NEXT: a = argv[0][0]; Missed `)`

[PATCH] D138227: [OPENMP]Initial support for severity clause

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

[PATCH] D138217: [OpenMP] Initial parsing and semantic analysis support for 'strict' modifier with 'grainsize' clause of 'taskloop' construct

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

[PATCH] D142297: [Clang][OpenMP] Find the type `omp_allocator_handle_t` from identifier table

2023-01-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/target_uses_allocators.c:108 // CHECK-NEXT: store i32 %[[#R1]], ptr %.x..void.addr, align 4 -// CHECK-NEXT: call void @__kmpc_free(i32 %[[#R0]], ptr %.x..void.addr, ptr inttoptr (i64 8 to ptr)) \ No newline at end of

[PATCH] D142297: [Clang][OpenMP] Find the type `omp_allocator_handle_t` from identifier table

2023-01-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/D142297/new/ https://reviews.llvm.org/D142297 ___

[PATCH] D129008: [Clang][OpenMP] Fix the issue that globalization doesn't work with byval struct function argument

2023-01-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D129008#4079872 , @tianshilei1992 wrote: > In D129008#4079660 , @aaron.ballman > wrote: > >> In D129008#3640194 , >> @tianshilei1992 wrote:

[PATCH] D129008: [Clang][OpenMP] Fix the issue that globalization doesn't work with byval struct function argument

2023-01-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D129008#4079914 , @tianshilei1992 wrote: > In D129008#4079892 , @ABataev wrote: > >> In D129008#4079872 , >> @tianshilei1992 wrote: >> >>> In

[PATCH] D129008: [Clang][OpenMP] Fix the issue that globalization doesn't work with byval struct function argument

2023-01-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D129008#4083150 , @tianshilei1992 wrote: > @rjmccall @ABataev Thanks for the help. So the basic idea is to build the > expressions in Sema for those captured decls and then emit them accordingly > in code gen, right? Yes.

[PATCH] D143021: [OpenMP 5.2] Deprecate 'destroy' clause without argument for 'depobj' construct

2023-02-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Basic/DiagnosticParseKinds.td:496 +def err_destroy_clause_without_argument +: Error<"'destroy' clause without argument on '#pragma omp depobj' " 1. Usually we name them err_omp_... Also, move to

[PATCH] D143021: [OpenMP 5.2] Deprecate 'destroy' clause without argument for 'depobj' construct

2023-02-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Basic/DiagnosticParseKinds.td:1374 +: Error<"expected '%0' clause with an argument on '#pragma omp %1' " +"construct since OpenMP %2">; def err_expected_end_declare_target_or_variant : Error<

[PATCH] D143021: [OpenMP 5.2] Deprecate 'destroy' clause without argument for 'depobj' construct

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

[PATCH] D141528: [Clang][OpenMP] Fix loop directive nested inside a parallel

2023-01-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:7865 +const Stmt *CS = cast(S.getAssociatedStmt())->getCapturedStmt(); +if (CS->getStmtClass() == Stmt::ForStmtClass) { + const ForStmt &ForS = cast(*CS); ``` if (const au

[PATCH] D141528: [Clang][OpenMP] Fix loop directive nested inside a parallel

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

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/OpenMPClause.h:5780 + /// Iterator modifier + Expr *IteratorModifierExpr = nullptr; + We're using tail allocation for such objects. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D141873: [Clang][OpenMP] Fix the issue that a functor is not captured properly in a task region

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

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Erroneous test are required Comment at: clang/include/clang/AST/OpenMPClause.h:310-314 + /// Fetches list of variables associated with this clause. + Expr *getIteratorRef() { +return (static_cast(this) +->template getTrailingObject

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/OpenMPClause.h:5869-5870 +if (IteratorModifier) { + HasIteratorModifier = true; + getTrailingObjects()[2 * varlist_size()] = IteratorModifier; +} Can we use just a nullptr as a m

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:1166-1168 +return llvm::any_of(Top->IteratorVarDecls, [VD](const VarDecl *IteratorVD) { + return IteratorVD == VD->getCanonicalDecl(); +}); doru1004 wrote: > ABataev wrote: > >

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/OpenMPClause.h:5779-5780 + /// Has iterator modifier + bool HasIteratorModifier = false; + It can be removed Comment at: clang/test/OpenMP/target_map_messages.cpp:970-979 +

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/target_map_messages.cpp:970-979 + // ompx-error@+8 {{use of undeclared identifier 'itt'; did you mean 'it'?}} + // ompx-note@+7 {{'it' declared here}} + // omp-error@+6 {{use of undeclared identifier 'itt'; did you m

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:1166-1168 +return llvm::any_of(Top->IteratorVarDecls, [VD](const VarDecl *IteratorVD) { + return IteratorVD == VD->getCanonicalDecl(); +}); doru1004 wrote: > ABataev wrote: > >

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:1166-1168 +return llvm::any_of(Top->IteratorVarDecls, [VD](const VarDecl *IteratorVD) { + return IteratorVD == VD->getCanonicalDecl(); +}); doru1004 wrote: > ABataev wrote: > >

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Can you add positive test for declare mapper? Comment at: clang/lib/Sema/SemaExpr.cpp:5423-5426 + +/// Act on the iterator variable declaration. +ActOnOpenMPIteratorVarDecl(VD); + Can we register this variable only in declare ma

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/declare_mapper_messages.c:33-36 +#pragma omp declare mapper(id2: struct vec vvec) map(iterator(it=0:vvec.len:2), tofrom:vvec.data[it]) +int var; // expected-note {{'var' declared here}} +// expected-error@+1 {{only var

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

2023-01-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/declare_mapper_messages.c:33-36 +#pragma omp declare mapper(id2: struct vec vvec) map(iterator(it=0:vvec.len:2), tofrom:vvec.data[it]) +int var; // expected-note {{'var' declared here}} +// expected-error@+1 {{only var

[PATCH] D141871: [Clang][OpenMP] Add parse and sema for iterator map modifier

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

[PATCH] D142233: [Clang][OpenMP] Bail out early if `Scope` is nullptr in case of any crash

2023-01-20 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:7249 // checking for any calls inside an Order region if (Scope->isOpenMPOrderClauseScope()) Diag(LParenLoc, diag::err_omp_unexpected_call_to_omp_runtime_api); Maybe better

[PATCH] D142233: [Clang][OpenMP] Bail out early if `Scope` is nullptr in case of any crash

2023-01-20 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:7249 // checking for any calls inside an Order region if (Scope->isOpenMPOrderClauseScope()) Diag(LParenLoc, diag::err_omp_unexpected_call_to_omp_runtime_api); tianshilei199

[PATCH] D142233: [Clang][OpenMP] Bail out early if `Scope` is nullptr in case of any crash

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

[PATCH] D142297: [Clang][OpenMP] Find the type `omp_allocator_handle_t` from identifier table

2023-01-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/target_uses_allocators.c:108 // CHECK-NEXT: store i32 %[[#R1]], ptr %.x..void.addr, align 4 -// CHECK-NEXT: call void @__kmpc_free(i32 %[[#R0]], ptr %.x..void.addr, ptr inttoptr (i64 8 to ptr)) \ No newline at end of

[PATCH] D125669: Adding support for target in_reduction

2022-06-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:5035-5039 +llvm::APInt TrueOrFalse(32, +S.hasClausesOfKind() ? 0 : 1); +IntegerLiteral IfCond(getContext(), TrueOrFalse, + getContext().getI

[PATCH] D127454: [OpenMP] Initial parsing and sema for 'parallel masked' construct

2022-06-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang-c/Index.h:2641 */ - CXCursor_TranslationUnit = 300, + CXCursor_TranslationUnit = 350, Does this change affect anything else in the compiler? Comment at: clang/include/clang/

[PATCH] D127454: [OpenMP] Initial parsing and sema for 'parallel masked' construct

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

[PATCH] D127803: Generate the capture for field when the field is used with implicit default.

2022-06-15 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Why do we need to insert new implicit DSA? Only explicit DSAs are expected to be stored, implicit ones can be deduced using the rules. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127803/new/ https://reviews.llvm.org/D12

[PATCH] D127855: [OpenMP] Basic parse and sema support for modifiers in order clause

2022-06-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. provide full context of the changes. Comment at: clang/include/clang/AST/OpenMPClause.h:7646 - /// A kind of the 'default' clause. + /// A kind of the 'order' clause. OpenMPOrderClauseKind Kind = OMPC_ORDER_unknown; Commit as NFC

[PATCH] D125669: Adding support for target in_reduction

2022-06-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. What about the description? Shall we still emit ` if(0)`? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125669/new/ https://reviews.llvm.org/D125669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[PATCH] D127803: Generate the capture for field when the field is used with implicit default.

2022-06-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaExprMember.cpp:1873-1877 +if (auto *PrivateCopy = +isOpenMPFDCaptureDecl(Field, Base.get(), IsArrow, OpLoc, &SS, + /*TemplateKWLoc=*/SourceLocation(), Field, +

[PATCH] D125669: Adding support for target in_reduction

2022-06-23 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D125669#3604302 , @RitanyaB wrote: > In D125669#3599134 , @ABataev wrote: > >> What about the description? Shall we still emit ` if(0)`? > > Can you please elaborate for more clarity?

[PATCH] D127803: Generate the capture for field when the field is used in openmp region with implicit default in the member function.

2022-06-23 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaExprMember.cpp:1873-1877 +if (auto *PrivateCopy = +isOpenMPFDCaptureDecl(Field, Base.get(), IsArrow, OpLoc, &SS, + /*TemplateKWLoc=*/SourceLocation(), Field, +

[PATCH] D125669: Adding support for target in_reduction

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

[PATCH] D127803: Generate the capture for field when the field is used in openmp region with implicit default in the member function.

2022-06-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:2398 +return VD; + ExprResult ThisExpr = ActOnCXXThis(SourceLocation()); + if (ThisExpr.isInvalid()) Maybe `BuildCXXThisExpr(SourceLocation(), getCurrentThisType(), /*IsIm

[PATCH] D127803: Generate the capture for field when the field is used in openmp region with implicit default in the member function.

2022-06-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/TreeTransform.h:11071-11073 + if (!getDerived().AlwaysRebuild() && !getSema().getLangOpts().OpenMP && + Base.get() == E->getBase() && QualifierLoc == E->getQualifierLoc() && + Member == E->getMemberDecl() && Fou

[PATCH] D127803: Generate the capture for field when the field is used in openmp region with implicit default in the member function.

2022-06-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/TreeTransform.h:11071-11073 + if (!getDerived().AlwaysRebuild() && !getSema().getLangOpts().OpenMP && + Base.get() == E->getBase() && QualifierLoc == E->getQualifierLoc() && + Member == E->getMemberDecl() && Fou

[PATCH] D127803: Generate the capture for field when the field is used in openmp region with implicit default in the member function.

2022-06-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/TreeTransform.h:11071-11073 + if (!getDerived().AlwaysRebuild() && !getSema().getLangOpts().OpenMP && + Base.get() == E->getBase() && QualifierLoc == E->getQualifierLoc() && + Member == E->getMemberDecl() && Fou

[PATCH] D127803: Generate the capture for field when the field is used in openmp region with implicit default in the member function.

2022-06-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:201 + const FieldDecl *FD = nullptr; + size_t Sz = -1; + VarDecl *VD = nullptr; What is Sz here? Better to give a better name and add a description for the struct and all fie

[PATCH] D128550: [OpenMP] Change OpenMP code generation for target region entries

2022-06-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:6720-6722 } else if (DefaultNT == -1) { -return nullptr; +return llvm::ConstantInt::get(CGF.Int32Ty, -1); } This code can be removed safely in this form Repository:

[PATCH] D126323: [OpenMP] Extend omp teams to permit nested omp atomic

2022-05-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:4983 + CurrentRegion != OMPD_loop && + !(SemaRef.getLangOpts().OpenMPExtensions && +CurrentRegion == OMPD_atomic); --

[PATCH] D126323: [OpenMP] Extend omp teams to permit nested omp atomic

2022-05-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:4983 + CurrentRegion != OMPD_loop && + !(SemaRef.getLangOpts().OpenMPExtensions && +CurrentRegion == OMPD_atomic); --

[PATCH] D126323: [OpenMP] Extend omp teams to permit nested omp atomic

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

[PATCH] D126619: [OpenMP][Clang] Fix atomic compare for signed vs. unsigned

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

[PATCH] D126602: [Clang][OpenMP] Replace IgnoreImpCasts with IgnoreImplicitAsWritten in atomic compare

2022-05-31 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Can you add the test? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126602/new/ https://reviews.llvm.org/D126602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

2022-06-01 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/D120290/new/ https://reviews.llvm.org/D120290 ___

[PATCH] D126602: [Clang][OpenMP] Avoid using `IgnoreImpCasts` if possible

2022-06-02 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/D126602/new/ https://reviews.llvm.org/D126602 ___

[PATCH] D127042: [Clang][OpenMP] Enable floating-point operation for `atomic compare` series

2022-06-04 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/D127042/new/ https://reviews.llvm.org/D127042 ___

[PATCH] D158266: [OpenMP] Patch for Support to loop bind clause : Checking Parent Region

2023-09-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:6167-6183 + if (isOpenMPWorksharingDirective(ParentDirective) || + ParentDirective == OMPD_loop) { +Diag(StartLoc, diag::err_omp_prohibited_region) +<< true << getOpenMPDire

[PATCH] D158266: [OpenMP] Patch for Support to loop bind clause : Checking Parent Region

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

[PATCH] D155635: [OpenMP] [Reduction] Allow PLUS (+) operator on reduction clauses in OMP > 52

2023-07-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Tests? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155635/new/ https://reviews.llvm.org/D155635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D155635: [OpenMP] [Reduction] Allow PLUS (+) operator on reduction clauses in OMP > 52

2023-07-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D155635#4512188 , @mdfazlay wrote: > In D155635#4512183 , @ABataev wrote: > >> Tests? > > I think I need to use `-fopenmp-version=60` to test this revision. As OMP 6.0 > is not officia

[PATCH] D155692: [clang][OpenMP] Add interop support for multiple depend clauses

2023-07-19 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:6986 +DependenceAddress = DependenciesArray.getPointer(); +CodeGenFunction::RunCleanupsScope LocalScope(*this); } mhalk wrote: > Not sure if this is useful here. > Saw this `

[PATCH] D155692: [clang][OpenMP] Add interop support for multiple depend clauses

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

[PATCH] D155849: [NFC][clang] Fix static analyzer concerns

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

[PATCH] D155635: [OpenMP] [Reduction] Allow PLUS (+) operator on reduction clauses in OMP > 52

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

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

2023-07-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:9866 + (CGM.getLangOpts().OpenMP >= 51 && + needsTaskBasedThreadLimit(D.getDirectiveKind()) && + D.hasClausesOfKind()); I think you don't need needsTaskBasedThreadLi

[PATCH] D156352: [OpenMP][Sema] Fix directive name modifier/if-clause/'target teams loop'

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

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

2023-07-26 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/StmtOpenMP.h:291 + /// the frontend. + OpenMPDirectiveKind prevMappedDirective; + OpenMPDirectiveKind PrevMappedDirective = llvm::omp::OMPD_unknown; Comment at: clang/include/

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

2023-07-27 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/TreeTransform.h:1652 + Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, + OpenMPDirectiveKind prevMappedDirective = OMPD_unknown) { + PrevMappedDirective CHANGES SINCE LAST ACTION

[PATCH] D157197: [clang][CodeGen][OpenMP] Fix if-clause for 'target teams loop'

2023-08-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:1570-1575 + // If we are here with a 'target teams loop' then we are emitting the + // 'parallel' region of the 'target teams distribute parallel for' + // emitted in place of the 'target teams loop'

[PATCH] D157197: [clang][CodeGen][OpenMP] Fix if-clause for 'target teams loop'

2023-08-12 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:1570-1575 + // If we are here with a 'target teams loop' then we are emitting the + // 'parallel' region of the 'target teams distribute parallel for' + // emitted in place of the 'target teams loop'

[PATCH] D157197: [clang][CodeGen][OpenMP] Fix if-clause for 'target teams loop'

2023-08-12 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:1570-1575 + // If we are here with a 'target teams loop' then we are emitting the + // 'parallel' region of the 'target teams distribute parallel for' + // emitted in place of the 'target teams loop'

[PATCH] D157933: [OpenMP 5.1] Parsing and Sema support for `scope` construct

2023-08-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Need to add the tests (and the checks, if required) for the nesting of the regions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157933/new/ https://reviews.llvm.org/D157933 ___

[PATCH] D157933: [OpenMP 5.1] Parsing and Sema support for `scope` construct

2023-08-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D157933#4587164 , @mdfazlay wrote: > In D157933#4586816 , @ABataev wrote: > >> Need to add the tests (and the checks, if required) for the nesting of the >> regions > > I think I have

[PATCH] D157933: [OpenMP 5.1] Parsing and Sema support for `scope` construct

2023-08-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Could you also add the nesting tests for outer scope directive? Currently it tests only for inner CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157933/new/ https://reviews.llvm.org/D157933 ___ cfe-commits mailing lis

[PATCH] D158266: Patch for Support to loop bind clause : Checking Parent Region

2023-08-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Basic/OpenMPKinds.h:251 +/// or 'omp for' directive, otherwise - false. +bool isOpenMPForDirective(OpenMPDirectiveKind DKind); + What if the outer regioun is sections? Repository: rG LLVM Github M

[PATCH] D158266: Patch for Support to loop bind clause : Checking Parent Region

2023-08-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Add tests for the nesting of regions to check all possible combinations correctly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158266/new/ https://reviews.llvm.org/D158266 ___

[PATCH] D158285: [NFC][CLANG] Fix wrong orders of function arguments positions

2023-08-21 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:18098-18101 case OMPC_allocate: Res = ActOnOpenMPAllocateClause(Data.DepModOrTailExpr, VarList, StartLoc, -LParenLoc, ColonLoc, EndLoc); +

[PATCH] D157933: [OpenMP 5.1] Parsing and Sema support for `scope` construct

2023-08-22 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. Please, update docs/OpenMPSupport.rst CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157933/new/ https://reviews.llvm.org/D157933 ___

[PATCH] D158559: [OpenMP] WIP: Attempt to fix clang frontend codegen issue

2023-08-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. 1. Always provide full context in the patch. 2. It looks like we're counting the pointer size (or the size of just the first element of the array), because we do not account array section here, either just the pointer or the first element only (most probably second opti

[PATCH] D158559: [OpenMP] WIP: Attempt to fix clang frontend codegen issue

2023-08-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D158559#4608397 , @ivanrodriguez3753 wrote: > In D158559#4608388 , @ABataev wrote: > >> 1. Always provide full context in the patch. > > Sure, would you mind mentioning what's missing?

[PATCH] D158559: [OpenMP] WIP: Attempt to fix clang frontend codegen issue

2023-08-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D158559#4608410 , @ivanrodriguez3753 wrote: > Also, should the underlying issue and test case be filed as an issue on > Github? I wasn't sure since this revision includes the bug and a description If you're going to fix this

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

2023-08-23 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/target_parallel_for_simd_tl_codegen.cpp:30 +// OMP51-NEXT: entry: +// OMP51-NEXT:[[DOTGLOBAL_TID__ADDR_I:%.*]] = alloca i32, align 4 +// OMP51-NEXT:[[DOTPART_ID__ADDR_I:%.*]] = alloca ptr, align 8 -

[PATCH] D158266: [OpenMP] Patch for Support to loop bind clause : Checking Parent Region

2023-10-09 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:6181-6190 + checkNestingOfRegions(*this, DSAStack, Kind, DirName, CancelRegion, +BindKind, StartLoc); Kind = OMPD_for; DSAStack->setCurrentDirective(OMPD_for);

[PATCH] D158266: [OpenMP] Patch for Support to loop bind clause : Checking Parent Region

2023-10-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:6181-6190 + checkNestingOfRegions(*this, DSAStack, Kind, DirName, CancelRegion, +BindKind, StartLoc); Kind = OMPD_for; DSAStack->setCurrentDirective(OMPD_for);

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

2023-07-31 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/StmtOpenMP.h:291 + /// the frontend. + OpenMPDirectiveKind PrevMappedDirective = llvm::omp::OMPD_unknown; + I don't see where this field is stored/loaded for PCH support. You need add a support

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

2023-08-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/StmtOpenMP.h:291 + /// the frontend. + OpenMPDirectiveKind PrevMappedDirective = llvm::omp::OMPD_unknown; + koops wrote: > ABataev wrote: > > I don't see where this field is stored/loaded for PC

<    9   10   11   12   13   14   15   16   17   18   >