https://github.com/alexey-bataev approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/91459
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -15095,16 +15136,70 @@ bool SemaOpenMP::checkTransformableLoopNest(
DependentPreInits = Dir->getPreInits();
else
llvm_unreachable("Unhandled loop transformation");
-if (!DependentPreInits)
- return;
-
@@ -9924,11 +9954,24 @@ checkOpenMPLoop(OpenMPDirectiveKind DKind, Expr
*CollapseLoopCountExpr,
Stmt *DependentPreInits = Transform->getPreInits();
if (!DependentPreInits)
return;
-for (Decl *C :
@@ -156,9 +156,9 @@ extern "C" void body(...) {}
// IR-EMPTY:
// IR-NEXT: [[FOR_INC]]:
// IR-NEXT:%[[TMP34:.+]] = load i32, ptr %[[DOTTILE_0_IV_I]], align 4
-// IR-NEXT:%[[INC:.+]] = add nsw i32 %[[TMP34]], 1
+// IR-NEXT:%[[INC:.+]] = add i32 %[[TMP34]], 1
@@ -9924,11 +9941,24 @@ checkOpenMPLoop(OpenMPDirectiveKind DKind, Expr
*CollapseLoopCountExpr,
Stmt *DependentPreInits = Transform->getPreInits();
if (!DependentPreInits)
return;
-for (Decl *C :
@@ -15097,14 +15125,75 @@ bool SemaOpenMP::checkTransformableLoopNest(
llvm_unreachable("Unhandled loop transformation");
if (!DependentPreInits)
return;
-llvm::append_range(OriginalInits.back(),
-
@@ -182,17 +182,34 @@ class OMPLoopScope : public
CodeGenFunction::RunCleanupsScope {
}
return false;
});
- PreInits = cast_or_null(LD->getPreInits());
+ PreInits = LD->getPreInits();
} else if (const auto *Tile = dyn_cast()) {
https://github.com/alexey-bataev approved this pull request.
LG
https://github.com/llvm/llvm-project/pull/92808
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -715,6 +787,65 @@ SemaOpenACC::ActOnClause(ArrayRef
ExistingClauses,
return nullptr;
}
+/// OpenACC 3.3 section 2.5.15:
+/// At a mininmum, the supported data types include ... the numerical data
types
+/// in C, C++, and Fortran.
+///
+/// If the reduction var is a
@@ -706,6 +736,48 @@ SemaOpenACC::ActOnClause(ArrayRef
ExistingClauses,
Clause.getLParenLoc(), Clause.getDeviceTypeArchitectures(),
Clause.getEndLoc());
}
+ case OpenACCClauseKind::Reduction: {
+// Restrictions only properly implemented on 'compute'
https://github.com/alexey-bataev edited
https://github.com/llvm/llvm-project/pull/92808
___
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:
ast printing tests?
https://github.com/llvm/llvm-project/pull/92808
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -426,6 +438,24 @@ SemaOpenACC::ActOnClause(ArrayRef
ExistingClauses,
<< /*NoArgs=*/1 << Clause.getDirectiveKind() << MaxArgs
<< Clause.getIntExprs().size();
+// OpenACC 3.3 Section 2.5.4:
+// A reduction clause may not appear on a parallel
https://github.com/alexey-bataev closed
https://github.com/llvm/llvm-project/pull/92055
___
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/92055
___
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/92210
___
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/91345
___
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/91325
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
alexey-bataev wrote:
Hmm, hard to tell, need to debug it.
https://github.com/llvm/llvm-project/pull/91264
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
alexey-bataev wrote:
> > > > > ```llvm
> > > > > struct.anon
> > > > > ```
> > > >
> > > >
> > > > Can you provide full IR dump here?
> > >
> > >
> > > https://godbolt.org/z/48h5s3W6v
> >
> >
> > It does not look like the issue of the target code, I don't see any wrong
> > access for
alexey-bataev wrote:
> > > ```llvm
> > > struct.anon
> > > ```
> >
> >
> > Can you provide full IR dump here?
>
> https://godbolt.org/z/48h5s3W6v
It does not look like the issue of the target code, I don't see any wrong
access for __context. Мост probably something wrong with the host
alexey-bataev wrote:
> ```llvm
> struct.anon
> ```
Can you provide full IR dump here?
https://github.com/llvm/llvm-project/pull/91264
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -613,6 +613,102 @@ static llvm::Function *emitOutlinedFunctionPrologue(
return F;
}
+static llvm::Function *emitOutlinedFunctionPrologueAggregate(
+CodeGenFunction , FunctionArgList ,
+llvm::MapVector>
+,
+llvm::DenseMap>
+,
+llvm::Value
@@ -5932,12 +5932,16 @@ void CGOpenMPRuntime::emitTargetOutlinedFunctionHelper(
CodeGenFunction CGF(CGM, true);
llvm::OpenMPIRBuilder::FunctionGenCallback & =
- [, , ](StringRef EntryFnName) {
+ [, , , this](StringRef EntryFnName) {
const CapturedStmt
alexey-bataev wrote:
> ```llvm
> = load i32, ptr %.capture_expr., align 4
> ```
Why do you think it reads beyond __context? %2 = getelementptr inbounds
%struct.anon, ptr %1, i32 0, i32 0 points to the first element in the
__context, if I'm not missing something. If it has the wrong value,
alexey-bataev wrote:
> @alexey-bataev see [#90152
> (comment)](https://github.com/llvm/llvm-project/pull/90152#issuecomment-2089786180)
> @alexey-bataev see [#90152
> (comment)](https://github.com/llvm/llvm-project/pull/90152#issuecomment-2089786180)
Thanks for the link
alexey-bataev wrote:
I think this breaks the build of SPEC2017/xalancbmk
https://github.com/llvm/llvm-project/pull/84050
___
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/90800
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
alexey-bataev wrote:
> > A test?
>
> I don't really know how to test this, as I don't know how to reproduce the
> problem. Any suggestion?
What is the problem?
https://github.com/llvm/llvm-project/pull/90800
___
cfe-commits mailing list
https://github.com/alexey-bataev approved this pull request.
LG with a nit
https://github.com/llvm/llvm-project/pull/90796
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -503,12 +512,211 @@ ExprResult SemaOpenACC::ActOnArraySectionExpr(Expr
*Base, SourceLocation LBLoc,
SourceLocation RBLoc) {
ASTContext = getASTContext();
- // TODO OpenACC: We likely have to reproduce a lot of the same
https://github.com/alexey-bataev edited
https://github.com/llvm/llvm-project/pull/90796
___
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/90796
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
alexey-bataev wrote:
A test?
https://github.com/llvm/llvm-project/pull/90800
___
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/90499
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4675,8 +4709,10 @@ bool Parser::ParseOpenMPVarList(OpenMPDirectiveKind
DKind,
// Only parse map-type-modifier[s] and map-type if a colon is present in
// the map clause.
if (ColonPresent) {
+ if (getLangOpts().OpenMP >= 60 && getCurToken().is(tok::colon))
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/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
@@ -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 ,
+
@@ -113,7 +114,7 @@ struct SA {
#pragma omp target map(b[true:true])
{}
-#pragma omp target map(: c,f) // expected-error {{missing map type}}
+#pragma omp target map(: c,f) // lt60-error {{missing map type}}
alexey-bataev wrote:
Yes, if you
@@ -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 =
@@ -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:
@@ -113,7 +114,7 @@ struct SA {
#pragma omp target map(b[true:true])
{}
-#pragma omp target map(: c,f) // expected-error {{missing map type}}
+#pragma omp target map(: c,f) // lt60-error {{missing map type}}
alexey-bataev wrote:
Check page
@@ -113,7 +114,7 @@ struct SA {
#pragma omp target map(b[true:true])
{}
-#pragma omp target map(: c,f) // expected-error {{missing map type}}
+#pragma omp target map(: c,f) // lt60-error {{missing map type}}
alexey-bataev wrote:
Hm,, I see in
https://github.com/alexey-bataev edited
https://github.com/llvm/llvm-project/pull/90499
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -113,7 +114,7 @@ struct SA {
#pragma omp target map(b[true:true])
{}
-#pragma omp target map(: c,f) // expected-error {{missing map type}}
+#pragma omp target map(: c,f) // lt60-error {{missing map type}}
alexey-bataev wrote:
So, does
@@ -113,7 +114,7 @@ struct SA {
#pragma omp target map(b[true:true])
{}
-#pragma omp target map(: c,f) // expected-error {{missing map type}}
+#pragma omp target map(: c,f) // lt60-error {{missing map type}}
alexey-bataev wrote:
I assume this
@@ -4268,7 +4287,11 @@ bool
Parser::parseMapTypeModifiers(SemaOpenMP::OpenMPVarListDataTy ) {
}
// Potential map-type token as it is followed by a colon.
if (PP.LookAhead(0).is(tok::colon))
-return false;
+if (getLangOpts().OpenMP >= 60)
+
https://github.com/alexey-bataev edited
https://github.com/llvm/llvm-project/pull/90499
___
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/89639
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6610,6 +6610,265 @@ class TypoExpr : public Expr {
};
+/// This class represents BOTH the OpenMP Array Section and OpenACC 'subarray',
+/// with a boolean differentiator.
+/// OpenMP 5.0 [2.1.5, Array Sections].
+/// To specify an array section in an OpenMP construct,
@@ -6610,6 +6610,265 @@ class TypoExpr : public Expr {
};
+/// This class represents BOTH the OpenMP Array Section and OpenACC 'subarray',
+/// with a boolean differentiator.
+/// OpenMP 5.0 [2.1.5, Array Sections].
+/// To specify an array section in an OpenMP construct,
@@ -6610,6 +6610,265 @@ class TypoExpr : public Expr {
};
+/// This class represents BOTH the OpenMP Array Section and OpenACC 'subarray',
+/// with a boolean differentiator.
+/// OpenMP 5.0 [2.1.5, Array Sections].
+/// To specify an array section in an OpenMP construct,
@@ -3413,8 +3413,8 @@ StringRef BuiltinType::getName(const PrintingPolicy
) const {
return "reserve_id_t";
case IncompleteMatrixIdx:
return "";
- case OMPArraySection:
-return "";
+ case ArraySection:
+return "";
alexey-bataev wrote:
Ok
@@ -443,12 +443,17 @@ ExprDependence
clang::computeDependence(ObjCIndirectCopyRestoreExpr *E) {
return E->getSubExpr()->getDependence();
}
-ExprDependence clang::computeDependence(OMPArraySectionExpr *E) {
+ExprDependence clang::computeDependence(ArraySectionExpr *E) {
@@ -11163,7 +11163,7 @@ def err_omp_declare_mapper_redefinition : Error<
"redefinition of user-defined mapper for type %0 with name %1">;
def err_omp_invalid_mapper: Error<
"cannot find a valid user-defined mapper for type %0 with name %1">;
-def err_omp_array_section_use
alexey-bataev wrote:
> @alexey-bataev Not having this new 'base' type as a member of the
> `StmtNodes.td` results in one of the Clang tools failing (see the CI). AND,
> since it is a template, it can't do that.
>
> I can't make it a Mixin, because it needs to provide some of the Expr-type
>
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
@@ -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 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
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
@@ -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
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
@@ -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
@@ -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
@@ -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
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
@@ -72,3 +92,9 @@ void OpenACCClausePrinter::VisitDefaultClause(const
OpenACCDefaultClause ) {
void OpenACCClausePrinter::VisitIfClause(const OpenACCIfClause ) {
OS << "if(" << C.getConditionExpr() << ")";
}
+
+void OpenACCClausePrinter::VisitSelfClause(const
@@ -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
-//
@@ -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
-//
@@ -835,18 +835,23 @@ Parser::OpenACCClauseParseResult
Parser::ParseOpenACCClauseParams(
case OpenACCClauseKind::Default: {
Token DefKindTok = getCurToken();
- if (expectIdentifierOrKeyword(*this))
-break;
+ if (expectIdentifierOrKeyword(*this)) {
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
@@ -997,6 +987,11 @@ class Sema final : public SemaBase {
return *OpenACCPtr;
}
+ SemaOpenMP () {
+assert(OpenMPPtr);
alexey-bataev wrote:
Add assertion message
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 () {
alexey-bataev wrote:
```suggestion
SemaOpenMP () {
```
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/88411
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -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());
+
@@ -55,12 +55,49 @@ bool doesClauseApplyToDirective(OpenACCDirectiveKind
DirectiveKind,
default:
return false;
}
+ case OpenACCClauseKind::If:
+switch (DirectiveKind) {
+case OpenACCDirectiveKind::Parallel:
+case OpenACCDirectiveKind::Serial:
+
@@ -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());
+
@@ -27,10 +28,48 @@ OpenACCDefaultClause *OpenACCDefaultClause::Create(const
ASTContext ,
return new (Mem) OpenACCDefaultClause(K, BeginLoc, LParenLoc, EndLoc);
}
+OpenACCIfClause *OpenACCIfClause::Create(const ASTContext ,
+
@@ -11099,6 +11099,19 @@ OpenACCClause
*TreeTransform::TransformOpenACCClause(
ParsedClause.setDefaultDetails(
cast(OldClause)->getDefaultClauseKind());
break;
+ case OpenACCClauseKind::If: {
+Expr *Cond = const_cast(
alexey-bataev wrote:
@@ -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
@@ -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());
+
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://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 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
@@ -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
@@ -15,3 +15,22 @@
#include "clang/AST/ASTContext.h"
using namespace clang;
+
+OpenACCDefaultClause *OpenACCDefaultClause::Create(const ASTContext ,
+ OpenACCDefaultClauseKind K,
+
@@ -419,6 +419,29 @@ enum class OpenACCDefaultClauseKind {
Invalid,
};
+template
+inline StreamTy (StreamTy ,
alexey-bataev wrote:
```suggestion
inline StreamTy (StreamTy ,
```
https://github.com/llvm/llvm-project/pull/88135
@@ -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)`?
1 - 100 of 1663 matches
Mail list logo