[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-01 Thread Alexey Bataev via cfe-commits
@@ -2013,6 +2064,184 @@ class OMPMergeableClause : public OMPClause { } }; +/// This represents the 'absent' clause in the '#pragma omp assume' +/// directive. +/// +/// \code +/// #pragma omp assume absent() +/// \endcode +/// In this example directive '#pragma omp assume'

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-01 Thread Alexey Bataev via cfe-commits
@@ -20796,6 +20796,150 @@ struct MappableVarListInfo { }; } // namespace +static std::pair +buildImplicitMap(Sema &S, QualType BaseType, DSAStackTy *Stack, + SmallVectorImpl &Maps) { + + const RecordDecl *RD = BaseType->getAsRecordDecl(); + // AST context is

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-01 Thread Alexey Bataev via cfe-commits
@@ -20796,6 +20796,150 @@ struct MappableVarListInfo { }; } // namespace +static std::pair +buildImplicitMap(Sema &S, QualType BaseType, DSAStackTy *Stack, + SmallVectorImpl &Maps) { + + const RecordDecl *RD = BaseType->getAsRecordDecl(); + // AST context is

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-01 Thread Alexey Bataev via cfe-commits
@@ -20796,6 +20796,150 @@ struct MappableVarListInfo { }; } // namespace +static std::pair +buildImplicitMap(Sema &S, QualType BaseType, DSAStackTy *Stack, + SmallVectorImpl &Maps) { + + const RecordDecl *RD = BaseType->getAsRecordDecl(); + // AST context is

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-01 Thread Alexey Bataev via cfe-commits
@@ -20796,6 +20796,150 @@ struct MappableVarListInfo { }; } // namespace +static std::pair +buildImplicitMap(Sema &S, QualType BaseType, DSAStackTy *Stack, + SmallVectorImpl &Maps) { + + const RecordDecl *RD = BaseType->getAsRecordDecl(); + // AST context is

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-01 Thread Alexey Bataev via cfe-commits
@@ -20796,6 +20796,150 @@ struct MappableVarListInfo { }; } // namespace +static std::pair +buildImplicitMap(Sema &S, QualType BaseType, DSAStackTy *Stack, + SmallVectorImpl &Maps) { + + const RecordDecl *RD = BaseType->getAsRecordDecl(); + // AST context is

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-01 Thread Alexey Bataev via cfe-commits
@@ -20796,6 +20796,150 @@ struct MappableVarListInfo { }; } // namespace +static std::pair +buildImplicitMap(Sema &S, QualType BaseType, DSAStackTy *Stack, + SmallVectorImpl &Maps) { + + const RecordDecl *RD = BaseType->getAsRecordDecl(); + // AST context is

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-01 Thread Alexey Bataev via cfe-commits
@@ -20796,6 +20796,150 @@ struct MappableVarListInfo { }; } // namespace +static std::pair +buildImplicitMap(Sema &S, QualType BaseType, DSAStackTy *Stack, + SmallVectorImpl &Maps) { + + const RecordDecl *RD = BaseType->getAsRecordDecl(); + // AST context is

[clang] [clang][OpenMP] Diagnose badly-formed collapsed imperfect loop nests (#60678) (PR #101305)

2024-08-01 Thread Alexey Bataev via cfe-commits
@@ -10,8 +10,9 @@ // //===--===// -#include "clang/AST/ASTContext.h" #include "clang/AST/StmtOpenMP.h" +#include "clang/AST/ASTContext.h" alexey-bataev wrote: Do this reordering in a separa

[clang] [clang][OpenMP] Diagnose badly-formed collapsed imperfect loop nests (#60678) (PR #101305)

2024-08-01 Thread Alexey Bataev via cfe-commits
@@ -9487,13 +9606,17 @@ checkOpenMPLoop(OpenMPDirectiveKind DKind, Expr *CollapseLoopCountExpr, unsigned NestedLoopCount = 1; bool SupportsNonPerfectlyNested = (SemaRef.LangOpts.OpenMP >= 50) && !isOpenMPLoopTransformationDirective(DKin

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-01 Thread Alexey Bataev via cfe-commits
@@ -6468,6 +6468,36 @@ class OMPErrorDirective final : public OMPExecutableDirective { return T->getStmtClass() == OMPErrorDirectiveClass; } }; + +// It's not really an executable directive, but it seems convenient to use +// that as the parent class. +class OMPAssumeDir

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-01 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev edited https://github.com/llvm/llvm-project/pull/92731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-01 Thread Alexey Bataev via cfe-commits
@@ -377,6 +377,8 @@ bool checkFailClauseParameter(OpenMPClauseKind FailClauseParameter); /// otherwise - false. bool isOpenMPExecutableDirective(OpenMPDirectiveKind DKind); +bool isOpenMPInformationalDirective(OpenMPDirectiveKind DKind); alexey-bataev wrote:

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-01 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev commented: Need a test with the nesting of the directives https://github.com/llvm/llvm-project/pull/92731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi

[clang] [Clang][Sema][OpenMP] Allow `num_teams` to accept multiple expressions (PR #99732)

2024-08-01 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: > > Update OpenMPSupport.rst and include info about changes to release notes > > This is not part of OpenMP standard so I don't think we need to update > `OpenMPSupport.rst`. We do not inform OpenMP committee here, just users :) For users it would be good to have this inf

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-01 Thread Alexey Bataev via cfe-commits
@@ -20796,6 +20796,150 @@ struct MappableVarListInfo { }; } // namespace +static std::pair +buildImplicitMap(Sema &S, QualType BaseType, DSAStackTy *Stack, + SmallVectorImpl &Maps) { + + const RecordDecl *RD = BaseType->getAsRecordDecl(); + // AST context is

[clang] [clang][OpenMP] Diagnose badly-formed collapsed imperfect loop nests (#60678) (PR #101305)

2024-08-02 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/101305 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][Doc] Add `ompx_bare` entry in `OpenMPSupport.rst` (PR #101711)

2024-08-02 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: Add also to the release notes https://github.com/llvm/llvm-project/pull/101711 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-02 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev edited https://github.com/llvm/llvm-project/pull/101101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-02 Thread Alexey Bataev via cfe-commits
@@ -20796,6 +20796,204 @@ struct MappableVarListInfo { }; } // namespace +static DeclRefExpr *buildImplicitMap(Sema &S, QualType BaseType, + DSAStackTy *Stack, + SmallVectorImpl &Maps) { + + const RecordD

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-02 Thread Alexey Bataev via cfe-commits
@@ -20796,6 +20796,204 @@ struct MappableVarListInfo { }; } // namespace +static DeclRefExpr *buildImplicitMap(Sema &S, QualType BaseType, + DSAStackTy *Stack, + SmallVectorImpl &Maps) { + + const RecordD

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-02 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev commented: Add info to OpenMPSupport.rst and release notes https://github.com/llvm/llvm-project/pull/101101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-02 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev edited https://github.com/llvm/llvm-project/pull/92731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-02 Thread Alexey Bataev via cfe-commits
@@ -399,6 +399,14 @@ class SemaOpenMP : public SemaBase { OpenMPDirectiveKind Kind, const DeclarationNameInfo &DirName, OpenMPDirectiveKind CancelRegion, ArrayRef Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc); + StmtResult ActOnOpenMPI

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-02 Thread Alexey Bataev via cfe-commits
@@ -9193,6 +9207,63 @@ StmtResult TreeTransform::TransformOMPExecutableDirective( AssociatedStmt.get(), D->getBeginLoc(), D->getEndLoc()); } +/// This is mostly the same as above, but allows 'informational' class +/// directives when rebuilding the stmt. It still takes

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-02 Thread Alexey Bataev via cfe-commits
@@ -9193,6 +9207,63 @@ StmtResult TreeTransform::TransformOMPExecutableDirective( AssociatedStmt.get(), D->getBeginLoc(), D->getEndLoc()); } +/// This is mostly the same as above, but allows 'informational' class +/// directives when rebuilding the stmt. It still takes

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-02 Thread Alexey Bataev via cfe-commits
@@ -399,6 +399,14 @@ class SemaOpenMP : public SemaBase { OpenMPDirectiveKind Kind, const DeclarationNameInfo &DirName, OpenMPDirectiveKind CancelRegion, ArrayRef Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc); + StmtResult ActOnOpenMPI

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-02 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev commented: Add the notest to OpenMPSupport.rst and release notes https://github.com/llvm/llvm-project/pull/92731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-02 Thread Alexey Bataev via cfe-commits
@@ -9193,6 +9207,63 @@ StmtResult TreeTransform::TransformOMPExecutableDirective( AssociatedStmt.get(), D->getBeginLoc(), D->getEndLoc()); } +/// This is mostly the same as above, but allows 'informational' class +/// directives when rebuilding the stmt. It still takes

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-02 Thread Alexey Bataev via cfe-commits
@@ -3532,6 +3532,10 @@ class Parser : public CodeCompletionHandler { OpenMPDirectiveKind DKind, SourceLocation Loc, bool ReadDirectiveWithinMetadirective); + StmtResult ParseOpenMPInformationalDirective( --

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-02 Thread Alexey Bataev via cfe-commits
@@ -9193,6 +9207,63 @@ StmtResult TreeTransform::TransformOMPExecutableDirective( AssociatedStmt.get(), D->getBeginLoc(), D->getEndLoc()); } +/// This is mostly the same as above, but allows 'informational' class +/// directives when rebuilding the stmt. It still takes

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-02 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev edited https://github.com/llvm/llvm-project/pull/101101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-02 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG with a nit https://github.com/llvm/llvm-project/pull/101101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP]Generate implicit default mapper for mapping array section. (PR #101101)

2024-08-02 Thread Alexey Bataev via cfe-commits
@@ -20796,6 +20796,204 @@ struct MappableVarListInfo { }; } // namespace +static DeclRefExpr *buildImplicitMap(Sema &S, QualType BaseType, + DSAStackTy *Stack, + SmallVectorImpl &Maps) { + + const RecordD

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-02 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/92731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenMP][Map][NFC] improve map chain. (PR #101903)

2024-08-05 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/101903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema][OpenMP] Allow `num_teams` to accept multiple expressions (PR #99732)

2024-08-05 Thread Alexey Bataev via cfe-commits
@@ -13004,13 +13004,34 @@ StmtResult SemaOpenMP::ActOnOpenMPTargetUpdateDirective( Clauses, AStmt); } +// This checks whether num_teams clause only has one expression. alexey-bataev wrote: Use `///` style of comment

[clang] fix issue: [Clang][OpenMP] Implicit conversion with `pragma omp taskloop` #100536 (PR #101812)

2024-08-05 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: Again, I doubt this is the right fix. I assume the proper fix should properly cast expressions to the required type before using them in the expressions. This patch not fixes the issues, but hides it. https://github.com/llvm/llvm-project/pull/101812 ___

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-08-05 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev closed https://github.com/llvm/llvm-project/pull/92731 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema][OpenMP] Allow `num_teams` to accept multiple expressions (PR #99732)

2024-08-06 Thread Alexey Bataev via cfe-commits
@@ -13034,13 +13034,36 @@ StmtResult SemaOpenMP::ActOnOpenMPTargetUpdateDirective( Clauses, AStmt); } +/// This checks whether a \p ClauseType clause \p C has at most \p Max +/// expression. If not, a diag of number \p Diag will be em

[clang] [Clang][Sema][OpenMP] Allow `num_teams` to accept multiple expressions (PR #99732)

2024-08-06 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/99732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][OMPX] Add the code generation for multi-dim `num_teams` (PR #101407)

2024-08-06 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/101407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f9c3310 - [OPENMP]Fix PR49366: crash on VLAs in task untied regions.

2022-02-21 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2022-02-21T12:28:47-08:00 New Revision: f9c3310d32c62b28c10084a0104563aeeecc06ec URL: https://github.com/llvm/llvm-project/commit/f9c3310d32c62b28c10084a0104563aeeecc06ec DIFF: https://github.com/llvm/llvm-project/commit/f9c3310d32c62b28c10084a0104563aeeecc06ec.diff

[clang] c835630 - [OPENMP]Fix PR49098: respect firstprivate of declare target variable.

2021-04-28 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2021-04-28T05:39:10-07:00 New Revision: c835630c25a4f9925517949579f66a43b113fbc9 URL: https://github.com/llvm/llvm-project/commit/c835630c25a4f9925517949579f66a43b113fbc9 DIFF: https://github.com/llvm/llvm-project/commit/c835630c25a4f9925517949579f66a43b113fbc9.diff

[clang] 230953d - [OPENMP]Fix PR48851: the locals are not globalized in SPMD mode.

2021-05-10 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2021-05-10T06:34:11-07:00 New Revision: 230953d5771f6f3ce6bf86b8bb6ae4d5eb75a218 URL: https://github.com/llvm/llvm-project/commit/230953d5771f6f3ce6bf86b8bb6ae4d5eb75a218 DIFF: https://github.com/llvm/llvm-project/commit/230953d5771f6f3ce6bf86b8bb6ae4d5eb75a218.diff

[clang] 6674854 - [OPENMP]Look through member function call base during implicit DSA analysis.

2021-12-17 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2021-12-17T10:18:51-08:00 New Revision: 667485413fd32cf470d7cd6260b50e486fedaf5e URL: https://github.com/llvm/llvm-project/commit/667485413fd32cf470d7cd6260b50e486fedaf5e DIFF: https://github.com/llvm/llvm-project/commit/667485413fd32cf470d7cd6260b50e486fedaf5e.diff

[clang] 7654bb6 - [OPENMP]Fix PR48571: critical/master in outlined contexts cause crash.

2021-03-24 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2021-03-24T10:15:24-07:00 New Revision: 7654bb6303d290b19cad29137be810e69a0bf917 URL: https://github.com/llvm/llvm-project/commit/7654bb6303d290b19cad29137be810e69a0bf917 DIFF: https://github.com/llvm/llvm-project/commit/7654bb6303d290b19cad29137be810e69a0bf917.diff

[clang] 9e9f6eb - [OPENMP]Fix PR49468: Declare target should allow empty sequences and namespaces.

2021-03-24 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2021-03-24T12:53:33-07:00 New Revision: 9e9f6eba84f01785ef154539878a7ebd2692344a URL: https://github.com/llvm/llvm-project/commit/9e9f6eba84f01785ef154539878a7ebd2692344a DIFF: https://github.com/llvm/llvm-project/commit/9e9f6eba84f01785ef154539878a7ebd2692344a.diff

[clang] dcf9617 - [OPENMP]Fix PR49052: Clang crashed when compiling target code with assert(0).

2021-03-29 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2021-03-29T06:36:06-07:00 New Revision: dcf96178cb3490028d9e2937cd8908b7c8fc75e6 URL: https://github.com/llvm/llvm-project/commit/dcf96178cb3490028d9e2937cd8908b7c8fc75e6 DIFF: https://github.com/llvm/llvm-project/commit/dcf96178cb3490028d9e2937cd8908b7c8fc75e6.diff

[clang] f6f21dc - [OPENMP]Fix PR49636: Assertion `(!Entry.getAddress() || Entry.getAddress() == Addr) && "Resetting with the new address."' failed.

2021-03-29 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2021-03-29T06:55:57-07:00 New Revision: f6f21dcd6c2fa8e44d8c466c5db190aef42beef2 URL: https://github.com/llvm/llvm-project/commit/f6f21dcd6c2fa8e44d8c466c5db190aef42beef2 DIFF: https://github.com/llvm/llvm-project/commit/f6f21dcd6c2fa8e44d8c466c5db190aef42beef2.diff

[clang] 0411b23 - [OPENMP]Map data field with l-value reference types.

2021-03-29 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2021-03-29T07:07:09-07:00 New Revision: 0411b2331916cc8c7a8be9dd0eb540b731e6d9ce URL: https://github.com/llvm/llvm-project/commit/0411b2331916cc8c7a8be9dd0eb540b731e6d9ce DIFF: https://github.com/llvm/llvm-project/commit/0411b2331916cc8c7a8be9dd0eb540b731e6d9ce.diff

[clang] 1696b8a - [OPENMP]Fix PR48740: OpenMP declare reduction in C does not require an initializer

2021-03-30 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2021-03-30T05:38:20-07:00 New Revision: 1696b8ae96b2d8bcbf90894bd344a8a090f43c84 URL: https://github.com/llvm/llvm-project/commit/1696b8ae96b2d8bcbf90894bd344a8a090f43c84 DIFF: https://github.com/llvm/llvm-project/commit/1696b8ae96b2d8bcbf90894bd344a8a090f43c84.diff

[clang] bd334c7 - [OPENMP]Fix test checks for 32bit targets, NFC.

2021-03-30 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2021-03-30T07:45:12-07:00 New Revision: bd334c790f2e43e72270b8044f08303e1c2f283b URL: https://github.com/llvm/llvm-project/commit/bd334c790f2e43e72270b8044f08303e1c2f283b DIFF: https://github.com/llvm/llvm-project/commit/bd334c790f2e43e72270b8044f08303e1c2f283b.diff

[clang] e2c7bf0 - [OPENMP]Fix PR48607: Crash during clang openmp codegen for firstprivate() of `float _Complex`.

2021-03-30 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2021-03-30T13:39:45-07:00 New Revision: e2c7bf08cc8e9c2461dd18b283b76ed2b3c59630 URL: https://github.com/llvm/llvm-project/commit/e2c7bf08cc8e9c2461dd18b283b76ed2b3c59630 DIFF: https://github.com/llvm/llvm-project/commit/e2c7bf08cc8e9c2461dd18b283b76ed2b3c59630.diff

[clang] 66da4f6 - [OPENMP]Fix PR48658: [OpenMP 5.0] Compiler crash when OpenMP atomic sync hints used.

2021-03-31 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2021-03-31T12:58:24-07:00 New Revision: 66da4f6fc9c1cd2a63f089b9888729292f0709f8 URL: https://github.com/llvm/llvm-project/commit/66da4f6fc9c1cd2a63f089b9888729292f0709f8 DIFF: https://github.com/llvm/llvm-project/commit/66da4f6fc9c1cd2a63f089b9888729292f0709f8.diff

[clang] a28e835 - [OPENMP]Fix PR48885: Crash in passing firstprivate args to tasks on Apple M1.

2021-03-31 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2021-03-31T13:00:58-07:00 New Revision: a28e835e9494af058bcbad667906271eec5da83b URL: https://github.com/llvm/llvm-project/commit/a28e835e9494af058bcbad667906271eec5da83b DIFF: https://github.com/llvm/llvm-project/commit/a28e835e9494af058bcbad667906271eec5da83b.diff

[clang] 10c7b9f - [OPENMP]Fix PR49115: Incorrect results for scan directive.

2021-04-16 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2021-04-16T06:25:35-07:00 New Revision: 10c7b9f64fa6c0257fe8a7f89123afb5e463ebda URL: https://github.com/llvm/llvm-project/commit/10c7b9f64fa6c0257fe8a7f89123afb5e463ebda DIFF: https://github.com/llvm/llvm-project/commit/10c7b9f64fa6c0257fe8a7f89123afb5e463ebda.diff

[clang] 0798842 - [OPENMP]Fix PR49698: OpenMP declare mapper causes segmentation fault.

2021-04-21 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2021-04-21T10:38:31-07:00 New Revision: 079884225a5571f4caf1a9c71b6748db8192e383 URL: https://github.com/llvm/llvm-project/commit/079884225a5571f4caf1a9c71b6748db8192e383 DIFF: https://github.com/llvm/llvm-project/commit/079884225a5571f4caf1a9c71b6748db8192e383.diff

[clang] b272698 - [OPENMP]Do not use OMP_MAP_TARGET_PARAM for data movement directives.

2021-01-19 Thread Alexey Bataev via cfe-commits
Author: Alexey Bataev Date: 2021-01-19T12:41:15-08:00 New Revision: b272698de790d6603db7992c0c0ad6446b7a52b8 URL: https://github.com/llvm/llvm-project/commit/b272698de790d6603db7992c0c0ad6446b7a52b8 DIFF: https://github.com/llvm/llvm-project/commit/b272698de790d6603db7992c0c0ad6446b7a52b8.diff

[clang] [llvm] [Clang][OMPX] Add the code generation for multi-dim `thread_limit` clause (PR #102717)

2024-08-16 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/102717 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP] Diagnostic check for imperfect loop collapse (PR #96087)

2024-08-19 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: > FWIW, I don't think there's a reasonable, safe way to collapse loops like > this and maintain parallel semantics, but ICBW. I think, there is a proper way. Just annotate these instructions with something like: ``` if (first inner loop iteration) { arr[i][i] = ...; } `

[clang] [clang][OpenMP] Diagnose badly-formed collapsed imperfect loop nests (#60678) (PR #101305)

2024-08-19 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev closed https://github.com/llvm/llvm-project/pull/101305 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP] Diagnostic check for imperfect loop collapse (PR #96087)

2024-08-19 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: > > > FWIW, I don't think there's a reasonable, safe way to collapse loops like > > > this and maintain parallel semantics, but ICBW. > > > > > > I think, there is a proper way. Just annotate these instructions with > > something like: > > ``` > > if (first inner loop ite

[clang] [llvm] [OpenMP] Diagnostic check for imperfect loop collapse (PR #96087)

2024-08-19 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: > > something like > > > > > > ``` > > > bool Init[N] = {false}; > > > for (int ij = 0; ij < N*N; ij++) { > > > int i = ij / N, j = ij % N; > > > #pragma omp critical > > > if (!Init[i]) { > > > arr2[i] = i; > > > Init[i] = true; > > > } > > > ar

[clang] [llvm] [OpenMP] Diagnostic check for imperfect loop collapse (PR #96087)

2024-08-19 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: I suggest defining the canonical (pessimistic in performance, but optimistic in correctness) form of the loop and emit it in the frontend. Later OpenMPOpt pass can optimize this "canonical" (slow but correct) form to better (but still correct) form, if possible (dropping c

[clang] [llvm] [OpenMP] Diagnostic check for imperfect loop collapse (PR #96087)

2024-08-19 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: > Can you explain why the critical section version of the code is safe, and why > it is an improvement over simply not collapsing the loop? 1. I'm not saying it is safe, I'm just saying that something like this might be safe 2. Without properly collapsing the loops, the co

[clang] [llvm] [clang][OpenMP] Shorten directive classification in ParseOpenMP (PR #94691)

2024-06-25 Thread Alexey Bataev via cfe-commits
@@ -2503,24 +2621,36 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective( "Not an OpenMP directive!"); ParsingOpenMPDirectiveRAII DirScope(*this); ParenBraceBracketBalancer BalancerRAIIObj(*this); - SmallVector Clauses; - std::bitset SeenClauses;

[clang] [llvm] [clang][OpenMP] Shorten directive classification in ParseOpenMP (PR #94691)

2024-06-25 Thread Alexey Bataev via cfe-commits
@@ -2374,88 +2374,206 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirectiveWithExtDecl( case OMPD_unknown: Diag(Tok, diag::err_omp_unknown_directive); break; - case OMPD_parallel: - case OMPD_simd: - case OMPD_tile: - case OMPD_unroll: - case OMPD_ta

[clang] [llvm] [clang][OpenMP] Shorten directive classification in ParseOpenMP (PR #94691)

2024-06-25 Thread Alexey Bataev via cfe-commits
@@ -2503,24 +2621,36 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective( "Not an OpenMP directive!"); ParsingOpenMPDirectiveRAII DirScope(*this); ParenBraceBracketBalancer BalancerRAIIObj(*this); - SmallVector Clauses; - std::bitset SeenClauses;

[clang] [llvm] [clang][OpenMP] Shorten directive classification in ParseOpenMP (PR #94691)

2024-06-25 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/94691 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [openmp] [Clang][OpenMP] Add reverse directive (PR #92916)

2024-06-26 Thread Alexey Bataev via cfe-commits
@@ -449,6 +449,23 @@ OMPUnrollDirective *OMPUnrollDirective::CreateEmpty(const ASTContext &C, SourceLocation(), SourceLocation()); } +OMPReverseDirective * +OMPReverseDirective::Create(const ASTContext &C, SourceLocation StartLoc, +SourceLoca

[clang] [llvm] [openmp] [Clang][OpenMP] Add reverse directive (PR #92916)

2024-06-26 Thread Alexey Bataev via cfe-commits
@@ -15749,6 +15757,186 @@ StmtResult SemaOpenMP::ActOnOpenMPUnrollDirective(ArrayRef Clauses, buildPreInits(Context, PreInits)); } +StmtResult SemaOpenMP::ActOnOpenMPReverseDirective(Stmt *AStmt, +

[clang] [llvm] [openmp] [Clang][OpenMP] Add reverse directive (PR #92916)

2024-06-26 Thread Alexey Bataev via cfe-commits
@@ -15749,6 +15757,186 @@ StmtResult SemaOpenMP::ActOnOpenMPUnrollDirective(ArrayRef Clauses, buildPreInits(Context, PreInits)); } +StmtResult SemaOpenMP::ActOnOpenMPReverseDirective(Stmt *AStmt, +

[clang] [llvm] [openmp] [Clang][OpenMP] Add reverse directive (PR #92916)

2024-06-26 Thread Alexey Bataev via cfe-commits
@@ -15749,6 +15757,186 @@ StmtResult SemaOpenMP::ActOnOpenMPUnrollDirective(ArrayRef Clauses, buildPreInits(Context, PreInits)); } +StmtResult SemaOpenMP::ActOnOpenMPReverseDirective(Stmt *AStmt, +

[clang] [llvm] [openmp] [Clang][OpenMP] Add reverse directive (PR #92916)

2024-06-26 Thread Alexey Bataev via cfe-commits
@@ -15749,6 +15757,186 @@ StmtResult SemaOpenMP::ActOnOpenMPUnrollDirective(ArrayRef Clauses, buildPreInits(Context, PreInits)); } +StmtResult SemaOpenMP::ActOnOpenMPReverseDirective(Stmt *AStmt, +

[clang] [clang][OpenMP] Place some common code in functions (PR #96811)

2024-06-26 Thread Alexey Bataev via cfe-commits
@@ -3010,6 +3010,28 @@ static bool FinishOpenMPLinearClause(OMPLinearClause &Clause, DeclRefExpr *IV, Expr *NumIterations, Sema &SemaRef, Scope *S, DSAStackTy *Stack); +static bool finishLinearClauses(S

[clang] [clang][OpenMP] Place some common code in functions (PR #96811)

2024-06-26 Thread Alexey Bataev via cfe-commits
@@ -7994,13 +8016,9 @@ void SemaOpenMP::ActOnOpenMPDeclareVariantDirective( FD->addAttr(NewAttr); } -StmtResult -SemaOpenMP::ActOnOpenMPParallelDirective(ArrayRef Clauses, - Stmt *AStmt, SourceLocation StartLoc, -

[clang] [clang][OpenMP] Place some common code in functions (PR #96811)

2024-06-26 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/96811 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [OpenMP] OpenMP 5.1 "assume" directive parsing support (PR #92731)

2024-06-27 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: > > > > don't you need more code in AST? > > > > > > > > > Sorry, I don't quite understand the question! Could you elaborate a > > > little please? > > > > > > I was thinking maybe you need changes in AST related files, like > > `ASTWriter.cpp`, but that might be not ne

[clang] [clang][OpenMP] Simplify handling of `if` clause (PR #96936)

2024-06-27 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG, thanks! https://github.com/llvm/llvm-project/pull/96936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][OpenMP] Implement `isOpenMPExecutableDirective` (PR #97089)

2024-06-28 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev edited https://github.com/llvm/llvm-project/pull/97089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][OpenMP] Implement `isOpenMPExecutableDirective` (PR #97089)

2024-06-28 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG with nits https://github.com/llvm/llvm-project/pull/97089 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][OpenMP] Implement `isOpenMPExecutableDirective` (PR #97089)

2024-06-28 Thread Alexey Bataev via cfe-commits
@@ -368,6 +368,14 @@ bool needsTaskBasedThreadLimit(OpenMPDirectiveKind DKind); /// is restricted only to memory order clauses of "OMPC_acquire", /// "OMPC_relaxed" and "OMPC_seq_cst". bool checkFailClauseParameter(OpenMPClauseKind FailClauseParameter); + +/// Checks if the spe

[clang] [clang][OpenMP] Implement `isOpenMPExecutableDirective` (PR #97089)

2024-06-28 Thread Alexey Bataev via cfe-commits
@@ -368,6 +368,14 @@ bool needsTaskBasedThreadLimit(OpenMPDirectiveKind DKind); /// is restricted only to memory order clauses of "OMPC_acquire", /// "OMPC_relaxed" and "OMPC_seq_cst". bool checkFailClauseParameter(OpenMPClauseKind FailClauseParameter); + +/// Checks if the spe

[clang] [clang][OpenMP] Implement `isOpenMPExecutableDirective` (PR #97089)

2024-06-28 Thread Alexey Bataev via cfe-commits
@@ -368,6 +368,14 @@ bool needsTaskBasedThreadLimit(OpenMPDirectiveKind DKind); /// is restricted only to memory order clauses of "OMPC_acquire", /// "OMPC_relaxed" and "OMPC_seq_cst". bool checkFailClauseParameter(OpenMPClauseKind FailClauseParameter); + +/// Checks if the spe

[clang] [flang] [llvm] [openmp] [Clang][OpenMP] Add permutation clause (PR #92030)

2024-10-08 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/92030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][OpenMP][test] Use x86_64-linux-gnu triple for test referencing avx512f feature (PR #111337)

2024-10-07 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/111337 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [openmp] [Clang][OpenMP] Add permutation clause (PR #92030)

2024-10-04 Thread Alexey Bataev via cfe-commits
@@ -16029,6 +16074,44 @@ OMPClause *SemaOpenMP::ActOnOpenMPSizesClause(ArrayRef SizeExprs, SanitizedSizeExprs); } +OMPClause *SemaOpenMP::ActOnOpenMPPermutationClause(ArrayRef PermExprs, +Sour

[clang] Fix for codegen Crash in Clang when using locator omp_all_memory with depobj construct (PR #114221)

2024-11-04 Thread Alexey Bataev via cfe-commits
@@ -36,6 +36,8 @@ int main(int argc, char **argv) { #pragma omp depobj(b) update(mutexinoutset) #pragma omp depobj(a) depend(iterator(char *p = argv[argc]:argv[0]:-1), out: p[0]) (void)tmain(a), tmain(b); + omp_depend_t obj; +#pragma omp depobj(obj) depend(inout: omp_all_m

[clang] [clang][OpenMP] Add 'allocator' modifier for 'allocate' clause. (PR #114883)

2024-11-05 Thread Alexey Bataev via cfe-commits
@@ -4539,6 +4539,8 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind DKind, bool NeedRParenForLinear = false; BalancedDelimiterTracker LinearT(*this, tok::l_paren, tok::annot_pragma_openmp_end); + BalancedDelimiterTracker AllocateT(*

[clang] [clang][OpenMP] Add 'allocator' modifier for 'allocate' clause. (PR #114883)

2024-11-05 Thread Alexey Bataev via cfe-commits
@@ -2242,9 +2247,16 @@ void OMPClausePrinter::VisitOMPAllocateClause(OMPAllocateClause *Node) { if (Node->varlist_empty()) return; OS << "allocate"; + OpenMPAllocateClauseModifier Modifier = Node->getAllocatorModifier(); if (Expr *Allocator = Node->getAllocator())

[clang] [flang] [llvm] Enable seq_cst Clause for flush Directive in OpenMP (PR #114072)

2024-11-04 Thread Alexey Bataev via cfe-commits
alexey-bataev wrote: Also, would be good to update clang WhatsNew and OpenMP status docs to reflect support for the new functionality https://github.com/llvm/llvm-project/pull/114072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [clang][OpenMP] Add 'allocator' modifier for 'allocate' clause. (PR #114883)

2024-11-05 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG with a nit. Update OpenMPSupport.rst https://github.com/llvm/llvm-project/pull/114883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[clang] [clang][OpenMP][NFC] Move 'allocate' clause modifier parsing into fun… (PR #115775)

2024-11-11 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/115775 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix for codegen Crash in Clang when using locator omp_all_memory with depobj construct (PR #114221)

2024-11-08 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/114221 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][OpenMP] Add codegen for scope directive (PR #109197)

2024-09-18 Thread Alexey Bataev via cfe-commits
@@ -0,0 +1,2267 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex "__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]" "pl_cond[.].+[.|,]" --prefix-filechec

[clang] [OpenMP][Docs] Update OpenMP supported features table (PR #109726)

2024-09-23 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG Also, add to Release notes https://github.com/llvm/llvm-project/pull/109726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [OpenMP][Docs] Update OpenMP release notes with 'omp scope' (PR #109752)

2024-09-24 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. LG https://github.com/llvm/llvm-project/pull/109752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix static analyzer concerns (PR #110243)

2024-09-27 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/110243 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix static analyzer concerns (PR #110243)

2024-09-27 Thread Alexey Bataev via cfe-commits
@@ -9195,7 +9195,7 @@ static bool checkOpenMPIterationSpace( SemaRef.Diag(CollapseLoopCountExpr->getExprLoc(), diag::note_omp_collapse_ordered_expr) << 0 << CollapseLoopCountExpr->getSourceRange(); - else + else if (OrderedLoop

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