[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Erich Keane via cfe-commits
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

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Alexey Bataev via 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

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Erich Keane via cfe-commits
@@ -166,3 +176,9 @@ void OpenACCClausePrinter::VisitVectorLengthClause( const OpenACCVectorLengthClause ) { OS << "vector_length(" << C.getIntExpr() << ")"; } + +void OpenACCClausePrinter::VisitPrivateClause(const OpenACCPrivateClause ) { + OS << "private("; +

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Erich Keane via 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/4] [OpenACC] Private Clause on Compute Constructs The private

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Erich Keane via cfe-commits
@@ -166,3 +176,9 @@ void OpenACCClausePrinter::VisitVectorLengthClause( const OpenACCVectorLengthClause ) { OS << "vector_length(" << C.getIntExpr() << ")"; } + +void OpenACCClausePrinter::VisitPrivateClause(const OpenACCPrivateClause ) { + OS << "private("; +

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Alexey Bataev via cfe-commits
@@ -166,3 +176,9 @@ void OpenACCClausePrinter::VisitVectorLengthClause( const OpenACCVectorLengthClause ) { OS << "vector_length(" << C.getIntExpr() << ")"; } + +void OpenACCClausePrinter::VisitPrivateClause(const OpenACCPrivateClause ) { + OS << "private("; +

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Erich Keane via cfe-commits
@@ -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 =

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Erich Keane via cfe-commits
@@ -134,6 +134,24 @@ OpenACCNumGangsClause *OpenACCNumGangsClause::Create(const ASTContext , return new (Mem) OpenACCNumGangsClause(BeginLoc, LParenLoc, IntExprs, EndLoc); } +OpenACCPrivateClause *OpenACCPrivateClause::Create(const ASTContext , +

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Alexey Bataev via cfe-commits
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

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Erich Keane via 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

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Alexey Bataev via cfe-commits
@@ -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 =

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Alexey Bataev via cfe-commits
@@ -134,6 +134,24 @@ OpenACCNumGangsClause *OpenACCNumGangsClause::Create(const ASTContext , return new (Mem) OpenACCNumGangsClause(BeginLoc, LParenLoc, IntExprs, EndLoc); } +OpenACCPrivateClause *OpenACCPrivateClause::Create(const ASTContext , +

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Erich Keane via cfe-commits
@@ -958,13 +931,14 @@ Parser::OpenACCClauseParseResult Parser::ParseOpenACCClauseParams( case OpenACCClauseKind::Link: case OpenACCClauseKind::NoCreate: case OpenACCClauseKind::Present: -case OpenACCClauseKind::Private: case OpenACCClauseKind::UseDevice:

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Erich Keane via cfe-commits
@@ -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 =

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Alexey Bataev via cfe-commits
@@ -958,13 +931,14 @@ Parser::OpenACCClauseParseResult Parser::ParseOpenACCClauseParams( case OpenACCClauseKind::Link: case OpenACCClauseKind::NoCreate: case OpenACCClauseKind::Present: -case OpenACCClauseKind::Private: case OpenACCClauseKind::UseDevice:

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Alexey Bataev via cfe-commits
@@ -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 =

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Erich Keane via cfe-commits
@@ -11196,6 +11198,31 @@ void OpenACCClauseTransform::VisitNumGangsClause( ParsedClause.getLParenLoc(), ParsedClause.getIntExprs(), ParsedClause.getEndLoc()); } + +template +void OpenACCClauseTransform::VisitPrivateClause( +const OpenACCPrivateClause ) { +

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Erich Keane via cfe-commits
@@ -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 =

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Erich Keane via cfe-commits
@@ -958,13 +931,14 @@ Parser::OpenACCClauseParseResult Parser::ParseOpenACCClauseParams( case OpenACCClauseKind::Link: case OpenACCClauseKind::NoCreate: case OpenACCClauseKind::Present: -case OpenACCClauseKind::Private: case OpenACCClauseKind::UseDevice:

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Erich Keane via 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/2] [OpenACC] Private Clause on Compute Constructs The private

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Alexey Bataev via cfe-commits
@@ -11196,6 +11198,31 @@ void OpenACCClauseTransform::VisitNumGangsClause( ParsedClause.getLParenLoc(), ParsedClause.getIntExprs(), ParsedClause.getEndLoc()); } + +template +void OpenACCClauseTransform::VisitPrivateClause( +const OpenACCPrivateClause ) { +

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Alexey Bataev via cfe-commits
@@ -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 =

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Alexey Bataev via cfe-commits
@@ -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

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-30 Thread Alexey Bataev via cfe-commits
@@ -958,13 +931,14 @@ Parser::OpenACCClauseParseResult Parser::ParseOpenACCClauseParams( case OpenACCClauseKind::Link: case OpenACCClauseKind::NoCreate: case OpenACCClauseKind::Present: -case OpenACCClauseKind::Private: case OpenACCClauseKind::UseDevice:

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-29 Thread via cfe-commits
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

[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)

2024-04-29 Thread Erich Keane via cfe-commits
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