[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

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

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

2023-11-22 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Basic/CMakeLists.txt:4 TargetParser + FrontendOpenMP ) What requires this new dependency? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123235/new/ https://reviews.llvm.org/D123235

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

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

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

2023-11-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/OpenMPClause.h:2516 +extern bool checkFailParameter(OpenMPClauseKind FailParameter); +/// This represents 'fail' clause in the '#pragma omp atomic' No way for extern functions. Declare in

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

2023-11-13 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/OpenMPClause.h:2554 + break; +case llvm::omp::OMPC_adjust_args: +case llvm::omp::OMPC_affinity: I think all these cases are unexpected and must be terminated with llvm_unreachable

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

2023-11-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D123235#4656464 , @koops wrote: > In clang/lib/AST/OpenMPClause.cpp, > > OMPClauseWithPreInit::get(const OMPClause *C) { > switch(C->getClauseKind()) { > case OMPC_schedule: > > default: > break; > } > >

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

2023-11-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/OpenMPClause.h:2555 + break; +default: + this->FailParameter = llvm::omp::OMPC_unknown; Same here, remove default: and explicitly list all possible values CHANGES SINCE LAST

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

2023-11-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D123235#4656459 , @koops wrote: > After the reverting of changes, putting the default in the switch case as > discussed in the comments earlier. No, do not put the default: switch, instead you need explicitly list all other

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

2023-11-07 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:12693 + OpenMPClauseKind FailParameter = FC->getFailParameter(); + SourceLocation DisplayLocation =

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

2023-11-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:12694-12695 + SourceLocation DisplayLocation = + ((FailParameter == OMPC_unknown) ? FC->getBeginLoc() + : FC->getFailParameterLoc()); + if

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

2023-11-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Parse/ParseOpenMP.cpp:3837-3838 return nullptr; - return Actions.ActOnOpenMPClause(Kind, Loc, Tok.getLocation()); + OMPClause *Clause = Actions.ActOnOpenMPClause(Kind, Loc, Tok.getLocation()); + return Clause; }

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

2023-11-02 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/OpenMPClause.h:2561 + + void initFailClause(SourceLocation LParenLoc, OpenMPClauseKind FailParameter, + SourceLocation FailParameterLoc) { Unused? Comment

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

2023-10-30 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Parse/ParseOpenMP.cpp:3328-3332 if (!FirstClause) { Diag(Tok, diag::err_omp_more_one_clause) << getOpenMPDirectiveName(DKind) << getOpenMPClauseName(CKind) << 0; ErrorFound = true; }

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

2023-10-30 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/OpenMPClause.h:2543 + void setFailParameter(OpenMPClauseKind FailParameter) { + +switch (FailParameter) { Remove this empty line Comment at:

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

2023-10-28 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/OpenMPClause.h:2525 + + OMPClause *FailMemoryOrderClause = nullptr; + SourceLocation ArgumentLoc; I don't like the idea of a reference to another clause here, it may lead to many issues with

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

2023-10-25 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/D158266/new/ https://reviews.llvm.org/D158266 ___ cfe-commits mailing list

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

2023-10-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/ASTNodeTraverser.h:217-220 +if (const auto *OMPC = dyn_cast(C)) { + Visit(OMPC); + return; +} Why do you need special logic here? Comment at:

[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] 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-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:

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

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

2023-09-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D158266#4640416 , @koops wrote: > Can someone please review the changes that I uploaded last week? Still need to add extra tests to the nesting_of_regions.cpp test CHANGES SINCE LAST ACTION

[PATCH] D158778: [CUDA] Propagate __float128 support from the host.

2023-08-29 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D158778#4622901 , @tra wrote: > @ABataev > > This patch breaks breaks two tests: > > - > github.com/llvm/llvm-project/blob/main/clang/test/OpenMP/nvptx_unsupported_type_codegen.cpp > - >

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

2023-08-25 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https://reviews.llvm.org/D152054 ___ cfe-commits mailing list

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

2023-08-24 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https://reviews.llvm.org/D152054 ___ cfe-commits mailing list

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

2023-08-24 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] D152054: [OpenMP] Codegen support for thread_limit on target directive

2023-08-24 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] 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] 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

[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

[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

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

[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

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

[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

[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

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

2023-08-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/OpenMPClause.h:2320-2321 +: public OMPClause, + private llvm::TrailingObjects { + OMPClause *MemoryOrderClause; Why need tail-allocation here for constant number of attributes? They can

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

2023-08-09 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/test/OpenMP/target_parallel_for_simd_tl_codegen.cpp:4 + +// RUN: %clang_cc1 -fopenmp -fopenmp-version=51 -emit-llvm %s -o - | FileCheck --check-prefix=OMP51 %s + Add PCH serialization/desrialization checks in

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

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

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

2023-08-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Please, use the script to generate the checks for the newly added tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152054/new/ https://reviews.llvm.org/D152054 ___ cfe-commits mailing list

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

2023-08-07 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/D152054/new/ https://reviews.llvm.org/D152054

[PATCH] D157229: Fix edge case in declare target initializer expression

2023-08-07 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/D157229/new/ https://reviews.llvm.org/D157229

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

2023-08-05 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:1564 + // Any if-clause associated with expansion for 'target teams loop' should + // apply to target region only. OpenMP 5.2 [3.4, if Clause, Semantics, 15-18] + if (S.getDirectiveKind() !=

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

2023-08-05 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Add the reference to openmp spec Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157197/new/ https://reviews.llvm.org/D157197 ___ cfe-commits mailing list

[PATCH] D157140: [clang][Sema][OpenMP] Fix capture region for 'target teams loop'

2023-08-05 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:15410 break; +case OMPD_target_teams_loop: + // This is equivalent to 'target teams distribute parallel for' with Need to have capture region for parallel, no? Repository:

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

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

[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

[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

[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] 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:

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

[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

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

[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

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

2023-07-17 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:343 + /// This may also be used in a similar way for other constructs. + OpenMPDirectiveKind MappedDirective = OMPD_unknown; + ABataev wrote: > I assume it shall be a member of

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

2023-07-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:9837 +def err_omp_bind_required_on_loop : Error< + "expected 'bind' clause for loop construct without an enclosing OpenMP " + "construct">; Also, `'loop'`

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

2023-07-11 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:9838 +def err_omp_loop_reduction_clause : Error< + "reduction clause not allowed with '#pragma omp loop bind(teams)'">; def warn_break_binds_to_switch : Warning<

[PATCH] D154672: [OPENMP52] Deprecation of 'depend' clause in ordered directive.

2023-07-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/Basic/DiagnosticParseKinds.td:1532 InGroup; +def warn_omp_depend_in_ordered_deprecated : Warning<"denpend clause for ordered is deprecated; use doacross instaed">, InGroup; denpend->depend

[PATCH] D154556: [OPENMP52] Support Support omp_cur_iteration modifier for doacross clause.

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

[PATCH] D154556: [OPENMP52] Support Support omp_cur_iteration modifier for doacross clause.

2023-07-06 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/AST/OpenMPClause.cpp:2516-2523 + if (DepType == OMPC_DOACROSS_source) +OS << "source:"; + else if (DepType == OMPC_DOACROSS_sink) +OS << "sink:"; + else if (DepType == OMPC_DOACROSS_source_omp_cur_iteration) +OS

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

2023-07-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 with a nit Comment at: clang/lib/CodeGen/CGDecl.cpp:19 #include "CGOpenMPRuntime.h" +#include "CGOpenMPRuntimeGPU.h" #include "CodeGenFunction.h" You

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

2023-07-05 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:591 + auto = + *(static_cast(())); + RT.getKmpcFreeShared(CGF, AddrSizePair); Same, just CGOpenMPRuntime = CGM.getOpenMPRuntime(); Comment at:

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

2023-07-05 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:1606 + CGOpenMPRuntimeGPU = + *(static_cast(())); + if (RT.isDelayedVariableLengthDecl(*this, )) { doru1004 wrote: > ABataev wrote: > > ABataev wrote: > > > 1. use

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

2023-07-05 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:1606 + CGOpenMPRuntimeGPU = + *(static_cast(())); + if (RT.isDelayedVariableLengthDecl(*this, )) { ABataev wrote: > 1. use `static_cast(CGM.getOpenMPRuntime())` > 2. It

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

2023-07-03 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/CodeGen/CGOpenMPRuntime.h:2285-2297 +return (C->getDependencyKind() == OMPC_DEPEND_sink); + } + bool isSource(const

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

2023-07-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:11410 } else { -assert(C->getDependencyKind() == OMPC_DEPEND_sink); +assert(ODK.isSink(C)); RTLFn = OMPBuilder.getOrCreateRuntimeFunction(CGM.getModule(), Add a

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

2023-07-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:1606 + CGOpenMPRuntimeGPU = + *(static_cast(())); + if (RT.isDelayedVariableLengthDecl(*this, )) { 1. use `static_cast(CGM.getOpenMPRuntime())` 2. It will crash if your

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

2023-07-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntime.cpp:11405-11406 + llvm::OpenMPIRBuilder = CGM.getOpenMPRuntime().getOMPBuilder(); + const OMPDependClause *DepC = dyn_cast(C); + const OMPDoacrossClause *DoC = dyn_cast(C); + if ((DoC &&

[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: > doru1004 wrote: > > ABataev wrote: >

[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: > doru1004 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()), +

[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] 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: > > 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/CGDecl.cpp:590-591 +void Emit(CodeGenFunction , Flags EmissionFlags) override { + CGOpenMPRuntimeGPU = + *(static_cast(())); + RT.getKmpcFreeShared(CGF, AddrSizePair); ``` auto

[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 = + *(static_cast(()));

[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 , - 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:589 +: AddrSizePair(AddrSizePair) {} +void Emit(CodeGenFunction , Flags Flags) override { + CGOpenMPRuntimeGPU = Name of the variable hides the type, potential warning or

[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

[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

[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

[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

[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

[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] 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 =

[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

[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

[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

[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] 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,

[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

  1   2   3   4   5   6   7   8   9   10   >