https://github.com/alexey-bataev approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/97110
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/alexey-bataev edited
https://github.com/llvm/llvm-project/pull/97446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/alexey-bataev approved this pull request.
LG with a nit
https://github.com/llvm/llvm-project/pull/97446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6270,16 +6270,20 @@ bool SemaOpenMP::mapLoopConstruct(
if (BindKind == OMPC_BIND_unknown) {
// Setting the enclosing teams or parallel construct for the loop
// directive without bind clause.
+ // [5.0:129:25-28] If the bind clause is not present on the
https://github.com/alexey-bataev approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/97445
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -8025,6 +8025,19 @@ class MappableExprsHandler {
MapCombinedInfoTy StructBaseCurInfo;
const Decl *D = Data.first;
const ValueDecl *VD = cast_or_null(D);
+ bool HasMapBasePtr = false;
+ bool HasMapArraySec = false;
+ for (const auto &M : Data.
@@ -8025,6 +8025,19 @@ class MappableExprsHandler {
MapCombinedInfoTy StructBaseCurInfo;
const Decl *D = Data.first;
const ValueDecl *VD = cast_or_null(D);
+ bool HasMapBasePtr = false;
+ bool HasMapArraySec = false;
+ for (const auto &M : Data.
@@ -7323,6 +7324,69 @@ void
SemaOpenMP::ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(Decl *D) {
FD->addAttr(AA);
}
+class OMPAssumeStmtVisitor : public StmtVisitor {
+ SmallVector *OMPAssumeScoped;
+
+public:
+ OMPAssumeStmtVisitor(SmallVector *OMPAssumeScoped) {
@@ -1759,8 +1759,35 @@ void
Parser::ParseOpenMPAssumesDirective(OpenMPDirectiveKind DKind,
Assumptions.push_back(Assumption);
}
+ StmtResult AssociatedStmt;
+
+ // Fix the scope for assume.
alexey-bataev wrote:
What's wrong with the scope?
https://g
@@ -760,6 +760,9 @@ void clang::getOpenMPCaptureRegions(
case OMPD_parallel:
CaptureRegions.push_back(OMPD_parallel);
break;
+case OMPD_assume:
+ CaptureRegions.push_back(OMPD_assume);
alexey-bataev wrote:
assume ends up with a simple
@@ -7323,6 +7324,69 @@ void
SemaOpenMP::ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(Decl *D) {
FD->addAttr(AA);
}
+class OMPAssumeStmtVisitor : public StmtVisitor {
+ SmallVector *OMPAssumeScoped;
+
+public:
+ OMPAssumeStmtVisitor(SmallVector *OMPAssumeScoped) {
@@ -8025,6 +8025,19 @@ class MappableExprsHandler {
MapCombinedInfoTy StructBaseCurInfo;
const Decl *D = Data.first;
const ValueDecl *VD = cast_or_null(D);
+ bool HasMapBasePtr = false;
+ bool HasMapArraySec = false;
+ for (const auto &M : Data.
@@ -8025,6 +8025,19 @@ class MappableExprsHandler {
MapCombinedInfoTy StructBaseCurInfo;
const Decl *D = Data.first;
const ValueDecl *VD = cast_or_null(D);
+ bool HasMapBasePtr = false;
+ bool HasMapArraySec = false;
+ for (const auto &M : Data.
@@ -8025,6 +8025,15 @@ class MappableExprsHandler {
MapCombinedInfoTy StructBaseCurInfo;
const Decl *D = Data.first;
const ValueDecl *VD = cast_or_null(D);
+ bool HasMapBasePtr = false;
+ bool HasMapArraySec = false;
+ if (VD && VD->getType()->i
@@ -8025,6 +8025,15 @@ class MappableExprsHandler {
MapCombinedInfoTy StructBaseCurInfo;
const Decl *D = Data.first;
const ValueDecl *VD = cast_or_null(D);
+ bool HasMapBasePtr = false;
+ bool HasMapArraySec = false;
+ if (VD && VD->getType()->i
https://github.com/alexey-bataev approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/94802
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
alexey-bataev wrote:
Missed one thing, the assignments for boolean flags must be |=, otherwise we
may miss some combinations.
https://github.com/llvm/llvm-project/pull/94802
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.or
alexey-bataev wrote:
> Hi Alexey,
>
> Thank you take look!
>
>
>
> > Missed one thing, the assignments for boolean flags must be |=, otherwise
> > we may miss some combinations.
>
>
>
> Are you talking about assignment of following?
>
> HasMapBasePtr = any_of(M, [](c..
>
>
>
> Do I ne
https://github.com/alexey-bataev approved this pull request.
https://github.com/llvm/llvm-project/pull/107158
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/alexey-bataev approved this pull request.
https://github.com/llvm/llvm-project/pull/107358
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/alexey-bataev approved this pull request.
https://github.com/llvm/llvm-project/pull/106786
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/alexey-bataev approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/102715
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/alexey-bataev commented:
A test is required
https://github.com/llvm/llvm-project/pull/102716
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
alexey-bataev wrote:
> > A test is required
>
>
>
> I literally don't know how to test this TBH. I think our current OpenMP tests
> generally don't cover this at all.
They do. To test this, you need to use clause in the template and check that
template params successfully replaced upon inst
https://github.com/alexey-bataev approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/102761
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/alexey-bataev approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/102716
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -11751,3 +11753,67 @@ void ASTRecordReader::readOMPChildren(OMPChildren
*Data) {
for (unsigned I = 0, E = Data->getNumChildren(); I < E; ++I)
Data->getChildren()[I] = readStmt();
}
+
+OpenACCClause *ASTRecordReader::readOpenACCClause() {
+ OpenACCClauseKind ClauseKin
@@ -47,6 +58,7 @@ class OpenACCConstructStmt : public Stmt {
SourceLocation getBeginLoc() const { return Range.getBegin(); }
SourceLocation getEndLoc() const { return Range.getEnd(); }
+ const ArrayRef clauses() const { return Clauses; }
alexey-bataev wro
@@ -30,13 +31,23 @@ class OpenACCConstructStmt : public Stmt {
/// the directive.
SourceRange Range;
- // TODO OPENACC: Clauses should probably be collected in this class.
+ /// The list of clauses. This is stored here as an ArrayRef, as this is the
+ /// most convieni
@@ -94,9 +94,10 @@ StmtResult
SemaOpenACC::ActOnEndStmtDirective(OpenACCDirectiveKind K,
case OpenACCDirectiveKind::Parallel:
case OpenACCDirectiveKind::Serial:
case OpenACCDirectiveKind::Kernels:
+// TODO OpenACC: Add clauses to the construct here.
return OpenA
@@ -101,24 +113,45 @@ class OpenACCAssociatedStmtConstruct : public
OpenACCConstructStmt {
/// those three, as they are semantically identical, and have only minor
/// differences in the permitted list of clauses, which can be differentiated
by
/// the 'Kind'.
-class OpenACCC
@@ -94,9 +94,10 @@ StmtResult
SemaOpenACC::ActOnEndStmtDirective(OpenACCDirectiveKind K,
case OpenACCDirectiveKind::Parallel:
case OpenACCDirectiveKind::Serial:
case OpenACCDirectiveKind::Kernels:
+// TODO OpenACC: Add clauses to the construct here.
return OpenA
@@ -101,24 +113,45 @@ class OpenACCAssociatedStmtConstruct : public
OpenACCConstructStmt {
/// those three, as they are semantically identical, and have only minor
/// differences in the permitted list of clauses, which can be differentiated
by
/// the 'Kind'.
-class OpenACCC
@@ -101,24 +113,45 @@ class OpenACCAssociatedStmtConstruct : public
OpenACCConstructStmt {
/// those three, as they are semantically identical, and have only minor
/// differences in the permitted list of clauses, which can be differentiated
by
/// the 'Kind'.
-class OpenACCC
https://github.com/alexey-bataev approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/87675
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -37,6 +37,32 @@ bool diagnoseConstructAppertainment(SemaOpenACC &S,
OpenACCDirectiveKind K,
}
return false;
}
+
+bool doesClauseApplyToDirective(OpenACCDirectiveKind DirectiveKind,
+OpenACCClauseKind ClauseKind) {
+ switch (ClauseKind) {
@@ -82,22 +119,22 @@ bool
SemaOpenACC::ActOnStartStmtDirective(OpenACCDirectiveKind K,
return diagnoseConstructAppertainment(*this, K, StartLoc, /*IsStmt=*/true);
}
-StmtResult SemaOpenACC::ActOnEndStmtDirective(OpenACCDirectiveKind K,
-
@@ -4003,20 +4003,11 @@ class TreeTransform {
return getSema().CreateRecoveryExpr(BeginLoc, EndLoc, SubExprs, Type);
}
- StmtResult RebuildOpenACCComputeConstruct(OpenACCDirectiveKind K,
-SourceLocation BeginLoc,
-
@@ -11077,16 +11077,65 @@ OMPClause
*TreeTransform::TransformOMPXBareClause(OMPXBareClause *C) {
//===--===//
// OpenACC transformation
//===--
@@ -37,6 +37,32 @@ bool diagnoseConstructAppertainment(SemaOpenACC &S,
OpenACCDirectiveKind K,
}
return false;
}
+
+bool doesClauseApplyToDirective(OpenACCDirectiveKind DirectiveKind,
+OpenACCClauseKind ClauseKind) {
+ switch (ClauseKind) {
@@ -11077,16 +11077,65 @@ OMPClause
*TreeTransform::TransformOMPXBareClause(OMPXBareClause *C) {
//===--===//
// OpenACC transformation
//===--
@@ -82,22 +119,22 @@ bool
SemaOpenACC::ActOnStartStmtDirective(OpenACCDirectiveKind K,
return diagnoseConstructAppertainment(*this, K, StartLoc, /*IsStmt=*/true);
}
-StmtResult SemaOpenACC::ActOnEndStmtDirective(OpenACCDirectiveKind K,
-
https://github.com/alexey-bataev edited
https://github.com/llvm/llvm-project/pull/87821
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/alexey-bataev approved this pull request.
LG with a nit
https://github.com/llvm/llvm-project/pull/87821
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1204,15 +1238,16 @@ Parser::OpenACCDirectiveParseInfo
Parser::ParseOpenACCDirective() {
Diag(Tok, diag::err_expected) << tok::l_paren;
}
- // Parses the list of clauses, if present.
- ParseOpenACCClauseList(DirKind);
+ // Parses the list of clauses, if present, p
https://github.com/alexey-bataev approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/87842
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -52,8 +57,18 @@ class SemaOpenACC : public SemaBase {
SourceLocation getEndLoc() const { return ClauseRange.getEnd(); }
+OpenACCDefaultClauseKind getDefaultClauseKind() const {
+ assert(ClauseKind == OpenACCClauseKind::Default);
+ return std::get(Details)
@@ -51,6 +51,36 @@ class OpenACCClauseWithParams : public OpenACCClause {
SourceLocation getLParenLoc() const { return LParenLoc; }
};
+// A 'default' clause, has the optional 'none' or 'present' argument.
alexey-bataev wrote:
```suggestion
/// A 'default'
@@ -52,8 +57,18 @@ class SemaOpenACC : public SemaBase {
SourceLocation getEndLoc() const { return ClauseRange.getEnd(); }
+OpenACCDefaultClauseKind getDefaultClauseKind() const {
+ assert(ClauseKind == OpenACCClauseKind::Default);
alexey-bataev
@@ -66,6 +96,8 @@ template class OpenACCClauseVisitor {
switch (C->getClauseKind()) {
case OpenACCClauseKind::Default:
+ VisitOpenACCDefaultClause(*static_cast(C));
alexey-bataev wrote:
Can you make it just `cast(C)`?
https://github.com/llvm/ll
@@ -419,6 +419,29 @@ enum class OpenACCDefaultClauseKind {
Invalid,
};
+template
+inline StreamTy &PrintOpenACCDefaultClauseKind(StreamTy &Out,
alexey-bataev wrote:
```suggestion
inline StreamTy &printOpenACCDefaultClauseKind(StreamTy &Out,
```
https://g
@@ -15,3 +15,22 @@
#include "clang/AST/ASTContext.h"
using namespace clang;
+
+OpenACCDefaultClause *OpenACCDefaultClause::Create(const ASTContext &C,
+ OpenACCDefaultClauseKind K,
+
@@ -11074,13 +11079,44 @@ OMPClause
*TreeTransform::TransformOMPXBareClause(OMPXBareClause *C) {
//===--===//
// OpenACC transformation
//===--
https://github.com/alexey-bataev approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/88135
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -11074,13 +11079,44 @@ OMPClause
*TreeTransform::TransformOMPXBareClause(OMPXBareClause *C) {
//===--===//
// OpenACC transformation
//===--
https://github.com/alexey-bataev edited
https://github.com/llvm/llvm-project/pull/88135
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/alexey-bataev edited
https://github.com/llvm/llvm-project/pull/88411
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/alexey-bataev commented:
General question. Should there be some support in
clang/tools/libclang/CIndex.cpp?
https://github.com/llvm/llvm-project/pull/88411
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.o
@@ -7425,6 +7425,12 @@ void ASTRecordWriter::writeOpenACCClause(const
OpenACCClause *C) {
writeEnum(DC->getDefaultClauseKind());
return;
}
+ case OpenACCClauseKind::If: {
+const auto *IC = cast(C);
+writeSourceLocation(IC->getLParenLoc());
+AddStmt(const
@@ -81,6 +100,51 @@ class OpenACCDefaultClause : public OpenACCClauseWithParams
{
SourceLocation EndLoc);
};
+/// Represents one of the handful of classes that has an optional/required
+/// 'condition' expression as an argument.
+class Op
@@ -11099,6 +11099,19 @@ OpenACCClause
*TreeTransform::TransformOpenACCClause(
ParsedClause.setDefaultDetails(
cast(OldClause)->getDefaultClauseKind());
break;
+ case OpenACCClauseKind::If: {
+Expr *Cond = const_cast(
alexey-bataev wrote:
@@ -27,10 +28,48 @@ OpenACCDefaultClause *OpenACCDefaultClause::Create(const
ASTContext &C,
return new (Mem) OpenACCDefaultClause(K, BeginLoc, LParenLoc, EndLoc);
}
+OpenACCIfClause *OpenACCIfClause::Create(const ASTContext &C,
+ Sour
@@ -7425,6 +7425,12 @@ void ASTRecordWriter::writeOpenACCClause(const
OpenACCClause *C) {
writeEnum(DC->getDefaultClauseKind());
return;
}
+ case OpenACCClauseKind::If: {
+const auto *IC = cast(C);
+writeSourceLocation(IC->getLParenLoc());
+AddStmt(const
@@ -55,12 +55,49 @@ bool doesClauseApplyToDirective(OpenACCDirectiveKind
DirectiveKind,
default:
return false;
}
+ case OpenACCClauseKind::If:
+switch (DirectiveKind) {
+case OpenACCDirectiveKind::Parallel:
+case OpenACCDirectiveKind::Serial:
+ca
@@ -7425,6 +7425,12 @@ void ASTRecordWriter::writeOpenACCClause(const
OpenACCClause *C) {
writeEnum(DC->getDefaultClauseKind());
return;
}
+ case OpenACCClauseKind::If: {
+const auto *IC = cast(C);
+writeSourceLocation(IC->getLParenLoc());
+AddStmt(const
https://github.com/alexey-bataev approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/88411
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -997,6 +987,11 @@ class Sema final : public SemaBase {
return *OpenACCPtr;
}
+ SemaOpenMP &OpenMP() {
alexey-bataev wrote:
```suggestion
SemaOpenMP &getOpenMP() {
```
https://github.com/llvm/llvm-project/pull/88642
__
@@ -11,6 +11,7 @@
///
//===--===//
+#include "clang/Sema/SemaOpenMP.h"
alexey-bataev wrote:
Sort it properly?
https://github.com/llvm/llvm-project/pull/88642
___
@@ -997,6 +987,11 @@ class Sema final : public SemaBase {
return *OpenACCPtr;
}
+ SemaOpenMP &OpenMP() {
+assert(OpenMPPtr);
alexey-bataev wrote:
Add assertion message
https://github.com/llvm/llvm-project/pull/88642
___
https://github.com/alexey-bataev approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/88642
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -835,18 +835,23 @@ Parser::OpenACCClauseParseResult
Parser::ParseOpenACCClauseParams(
case OpenACCClauseKind::Default: {
Token DefKindTok = getCurToken();
- if (expectIdentifierOrKeyword(*this))
-break;
+ if (expectIdentifierOrKeyword(*this)) {
@@ -160,12 +169,58 @@ SemaOpenACC::ActOnClause(ArrayRef
ExistingClauses,
// The parser has ensured that we have a proper condition expr, so there
// isn't really much to do here.
-// TODO OpenACC: When we implement 'self', this clauses causes us to
-// 'ignore
@@ -160,12 +169,58 @@ SemaOpenACC::ActOnClause(ArrayRef
ExistingClauses,
// The parser has ensured that we have a proper condition expr, so there
// isn't really much to do here.
-// TODO OpenACC: When we implement 'self', this clauses causes us to
-// 'ignore
@@ -72,3 +92,9 @@ void OpenACCClausePrinter::VisitDefaultClause(const
OpenACCDefaultClause &C) {
void OpenACCClausePrinter::VisitIfClause(const OpenACCIfClause &C) {
OS << "if(" << C.getConditionExpr() << ")";
}
+
+void OpenACCClausePrinter::VisitSelfClause(const OpenACCSelf
https://github.com/alexey-bataev approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/88760
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -156,6 +156,64 @@ class OpenACCSelfClause : public
OpenACCClauseWithCondition {
Expr *ConditionExpr, SourceLocation EndLoc);
};
+/// Represents one of a handful of classes that have integer expressions.
+/// Semantically, many only permit
@@ -156,6 +156,64 @@ class OpenACCSelfClause : public
OpenACCClauseWithCondition {
Expr *ConditionExpr, SourceLocation EndLoc);
};
+/// Represents one of a handful of classes that have integer expressions.
+/// Semantically, many only permit
@@ -156,6 +156,64 @@ class OpenACCSelfClause : public
OpenACCClauseWithCondition {
Expr *ConditionExpr, SourceLocation EndLoc);
};
+/// Represents one of a handful of classes that have integer expressions.
+/// Semantically, many only permit
https://github.com/alexey-bataev approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/89151
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3644,10 +3644,22 @@ class Parser : public CodeCompletionHandler {
/// Parses the clause of the 'bind' argument, which can be a string literal
or
/// an ID expression.
ExprResult ParseOpenACCBindClauseArgument();
+
+ /// A type to represent the state of parsing after
https://github.com/alexey-bataev approved this pull request.
LG with a nit
https://github.com/llvm/llvm-project/pull/89460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/alexey-bataev edited
https://github.com/llvm/llvm-project/pull/89460
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6610,6 +6610,111 @@ class TypoExpr : public Expr {
};
+// This is a sub-class for OpenMP and OpenACC array sections. OpenACC uses a
+// very small subset of the functionality, so this class only exposes the
things
+// the two have in common. This type is not expected to
@@ -6610,6 +6610,111 @@ class TypoExpr : public Expr {
};
+// This is a sub-class for OpenMP and OpenACC array sections. OpenACC uses a
+// very small subset of the functionality, so this class only exposes the
things
+// the two have in common. This type is not expected to
@@ -6610,6 +6610,111 @@ class TypoExpr : public Expr {
};
+// This is a sub-class for OpenMP and OpenACC array sections. OpenACC uses a
+// very small subset of the functionality, so this class only exposes the
things
+// the two have in common. This type is not expected to
https://github.com/alexey-bataev approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/89639
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -812,6 +812,7 @@ int bar(int n){
// CHECK1-NEXT:[[DOTCAPTURE_EXPR__ADDR:%.*]] = alloca i64, align 8
// CHECK1-NEXT:[[DOTCAPTURE_EXPR__ADDR2:%.*]] = alloca i64, align 8
// CHECK1-NEXT:[[AA_CASTED:%.*]] = alloca i64, align 8
+// CHECK1-NEXT:[[DOTCAPTURE_EXPR__C
@@ -11350,8 +11350,13 @@ void
OMPClauseReader::VisitOMPAllocateClause(OMPAllocateClause *C) {
void OMPClauseReader::VisitOMPNumTeamsClause(OMPNumTeamsClause *C) {
VisitOMPClauseWithPreInit(C);
- C->setNumTeams(Record.readSubExpr());
C->setLParenLoc(Record.readSourceLoca
@@ -6131,60 +6131,77 @@ class OMPMapClause final : public
OMPMappableExprListClause,
/// \endcode
/// In this example directive '#pragma omp teams' has clause 'num_teams'
/// with single expression 'n'.
-class OMPNumTeamsClause : public OMPClause, public OMPClauseWithPreInit {
@@ -3793,8 +3793,8 @@ bool
RecursiveASTVisitor::VisitOMPMapClause(OMPMapClause *C) {
template
bool RecursiveASTVisitor::VisitOMPNumTeamsClause(
OMPNumTeamsClause *C) {
+ TRY_TO(VisitOMPClauseList(C));
TRY_TO(VisitOMPClauseWithPreInit(C));
alexey-batae
@@ -843,9 +843,8 @@ void OMPClauseProfiler::VisitOMPAllocateClause(const
OMPAllocateClause *C) {
VisitOMPClauseList(C);
}
void OMPClauseProfiler::VisitOMPNumTeamsClause(const OMPNumTeamsClause *C) {
+ VisitOMPClauseList(C);
VistOMPClauseWithPreInit(C);
a
@@ -13901,6 +13901,20 @@ StmtResult SemaOpenMP::ActOnOpenMPTargetTeamsDirective(
return StmtError();
}
+ const OMPClause *NumTeamsClause = nullptr;
+ bool HasNumTeamsClause = llvm::any_of(Clauses, [&](const OMPClause *C) {
+NumTeamsClause = C;
+return C->getCla
https://github.com/alexey-bataev approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/100162
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6037,8 +6037,6 @@ const Expr
*CGOpenMPRuntime::getNumTeamsExprForTargetDirective(
MinTeamsVal = MaxTeamsVal = 1;
return nullptr;
}
- MinTeamsVal = MaxTeamsVal = 1;
- return nullptr;
alexey-bataev wrote:
Wrong fix, previous
https://github.com/alexey-bataev approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/95695
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3793,8 +3793,8 @@ bool
RecursiveASTVisitor::VisitOMPMapClause(OMPMapClause *C) {
template
bool RecursiveASTVisitor::VisitOMPNumTeamsClause(
OMPNumTeamsClause *C) {
+ TRY_TO(VisitOMPClauseList(C));
TRY_TO(VisitOMPClauseWithPreInit(C));
alexey-batae
@@ -21587,32 +21597,39 @@ const ValueDecl
*SemaOpenMP::getOpenMPDeclareMapperVarName() const {
return cast(DSAStack->getDeclareMapperVarRef())->getDecl();
}
-OMPClause *SemaOpenMP::ActOnOpenMPNumTeamsClause(Expr *NumTeams,
+OMPClause *SemaOpenMP::ActOnOpenMPNumTeamsClause(A
@@ -2013,6 +2014,179 @@ 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'
@@ -2013,6 +2014,179 @@ 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'
@@ -2013,6 +2014,179 @@ 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'
1601 - 1700 of 2257 matches
Mail list logo