https://github.com/erichkeane closed
https://github.com/llvm/llvm-project/pull/90521
___
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/90521
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -166,3 +176,9 @@ void OpenACCClausePrinter::VisitVectorLengthClause(
const OpenACCVectorLengthClause ) {
OS << "vector_length(" << C.getIntExpr() << ")";
}
+
+void OpenACCClausePrinter::VisitPrivateClause(const OpenACCPrivateClause ) {
+ OS << "private(";
+
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/90521
>From 54ba7d0b7d71d751cf268c3bdfb89bc5ca628a6b Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Mon, 22 Apr 2024 13:31:52 -0700
Subject: [PATCH 1/4] [OpenACC] Private Clause on Compute Constructs
The private
@@ -166,3 +176,9 @@ void OpenACCClausePrinter::VisitVectorLengthClause(
const OpenACCVectorLengthClause ) {
OS << "vector_length(" << C.getIntExpr() << ")";
}
+
+void OpenACCClausePrinter::VisitPrivateClause(const OpenACCPrivateClause ) {
+ OS << "private(";
+
@@ -166,3 +176,9 @@ void OpenACCClausePrinter::VisitVectorLengthClause(
const OpenACCVectorLengthClause ) {
OS << "vector_length(" << C.getIntExpr() << ")";
}
+
+void OpenACCClausePrinter::VisitPrivateClause(const OpenACCPrivateClause ) {
+ OS << "private(";
+
@@ -423,6 +450,52 @@ ExprResult SemaOpenACC::ActOnIntExpr(OpenACCDirectiveKind
DK,
return IntExpr;
}
+ExprResult SemaOpenACC::ActOnVar(Expr *VarExpr) {
+ // We still need to retain the array subscript/subarray exprs, so work on a
+ // copy.
+ Expr *CurVarExpr =
@@ -134,6 +134,24 @@ OpenACCNumGangsClause *OpenACCNumGangsClause::Create(const
ASTContext ,
return new (Mem) OpenACCNumGangsClause(BeginLoc, LParenLoc, IntExprs,
EndLoc);
}
+OpenACCPrivateClause *OpenACCPrivateClause::Create(const ASTContext ,
+
https://github.com/alexey-bataev edited
https://github.com/llvm/llvm-project/pull/90521
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/90521
>From 54ba7d0b7d71d751cf268c3bdfb89bc5ca628a6b Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Mon, 22 Apr 2024 13:31:52 -0700
Subject: [PATCH 1/3] [OpenACC] Private Clause on Compute Constructs
The private
@@ -423,6 +450,52 @@ ExprResult SemaOpenACC::ActOnIntExpr(OpenACCDirectiveKind
DK,
return IntExpr;
}
+ExprResult SemaOpenACC::ActOnVar(Expr *VarExpr) {
+ // We still need to retain the array subscript/subarray exprs, so work on a
+ // copy.
+ Expr *CurVarExpr =
@@ -134,6 +134,24 @@ OpenACCNumGangsClause *OpenACCNumGangsClause::Create(const
ASTContext ,
return new (Mem) OpenACCNumGangsClause(BeginLoc, LParenLoc, IntExprs,
EndLoc);
}
+OpenACCPrivateClause *OpenACCPrivateClause::Create(const ASTContext ,
+
@@ -958,13 +931,14 @@ Parser::OpenACCClauseParseResult
Parser::ParseOpenACCClauseParams(
case OpenACCClauseKind::Link:
case OpenACCClauseKind::NoCreate:
case OpenACCClauseKind::Present:
-case OpenACCClauseKind::Private:
case OpenACCClauseKind::UseDevice:
@@ -423,6 +450,52 @@ ExprResult SemaOpenACC::ActOnIntExpr(OpenACCDirectiveKind
DK,
return IntExpr;
}
+ExprResult SemaOpenACC::ActOnVar(Expr *VarExpr) {
+ // We still need to retain the array subscript/subarray exprs, so work on a
+ // copy.
+ Expr *CurVarExpr =
@@ -958,13 +931,14 @@ Parser::OpenACCClauseParseResult
Parser::ParseOpenACCClauseParams(
case OpenACCClauseKind::Link:
case OpenACCClauseKind::NoCreate:
case OpenACCClauseKind::Present:
-case OpenACCClauseKind::Private:
case OpenACCClauseKind::UseDevice:
@@ -423,6 +450,52 @@ ExprResult SemaOpenACC::ActOnIntExpr(OpenACCDirectiveKind
DK,
return IntExpr;
}
+ExprResult SemaOpenACC::ActOnVar(Expr *VarExpr) {
+ // We still need to retain the array subscript/subarray exprs, so work on a
+ // copy.
+ Expr *CurVarExpr =
@@ -11196,6 +11198,31 @@ void
OpenACCClauseTransform::VisitNumGangsClause(
ParsedClause.getLParenLoc(), ParsedClause.getIntExprs(),
ParsedClause.getEndLoc());
}
+
+template
+void OpenACCClauseTransform::VisitPrivateClause(
+const OpenACCPrivateClause ) {
+
@@ -423,6 +450,52 @@ ExprResult SemaOpenACC::ActOnIntExpr(OpenACCDirectiveKind
DK,
return IntExpr;
}
+ExprResult SemaOpenACC::ActOnVar(Expr *VarExpr) {
+ // We still need to retain the array subscript/subarray exprs, so work on a
+ // copy.
+ Expr *CurVarExpr =
@@ -958,13 +931,14 @@ Parser::OpenACCClauseParseResult
Parser::ParseOpenACCClauseParams(
case OpenACCClauseKind::Link:
case OpenACCClauseKind::NoCreate:
case OpenACCClauseKind::Present:
-case OpenACCClauseKind::Private:
case OpenACCClauseKind::UseDevice:
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/90521
>From 54ba7d0b7d71d751cf268c3bdfb89bc5ca628a6b Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Mon, 22 Apr 2024 13:31:52 -0700
Subject: [PATCH 1/2] [OpenACC] Private Clause on Compute Constructs
The private
@@ -11196,6 +11198,31 @@ void
OpenACCClauseTransform::VisitNumGangsClause(
ParsedClause.getLParenLoc(), ParsedClause.getIntExprs(),
ParsedClause.getEndLoc());
}
+
+template
+void OpenACCClauseTransform::VisitPrivateClause(
+const OpenACCPrivateClause ) {
+
@@ -423,6 +450,52 @@ ExprResult SemaOpenACC::ActOnIntExpr(OpenACCDirectiveKind
DK,
return IntExpr;
}
+ExprResult SemaOpenACC::ActOnVar(Expr *VarExpr) {
+ // We still need to retain the array subscript/subarray exprs, so work on a
+ // copy.
+ Expr *CurVarExpr =
@@ -112,6 +116,18 @@ class SemaOpenACC : public SemaBase {
return const_cast(this)->getIntExprs();
}
+// Non-const version that permits modifying of the VarList for the purposes
+// of Sema enforcement.
+SmallVector () {
alexey-bataev
@@ -958,13 +931,14 @@ Parser::OpenACCClauseParseResult
Parser::ParseOpenACCClauseParams(
case OpenACCClauseKind::Link:
case OpenACCClauseKind::NoCreate:
case OpenACCClauseKind::Present:
-case OpenACCClauseKind::Private:
case OpenACCClauseKind::UseDevice:
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Erich Keane (erichkeane)
Changes
The private clause is the first that takes a 'var-list', thus this has a lot of
additional work to enable the var-list type. A 'var' is a traditional variable
reference, subscript, member-expression, or
https://github.com/erichkeane created
https://github.com/llvm/llvm-project/pull/90521
The private clause is the first that takes a 'var-list', thus this has a lot of
additional work to enable the var-list type. A 'var' is a traditional variable
reference, subscript, member-expression, or
26 matches
Mail list logo