@@ -74,12 +74,12 @@ void use() {
for (int i = 0; i < 10; ++i) {
// FIXME: Once we have a new array-section type to represent OpenACC as
// well, change this error message.
erichkeane wrote:
Thanks, done in bb1a8bbb
@@ -74,12 +74,12 @@ void use() {
for (int i = 0; i < 10; ++i) {
// FIXME: Once we have a new array-section type to represent OpenACC as
// well, change this error message.
NagyDonat wrote:
This FIXME was resolved by this commit, consider removing it
https://github.com/erichkeane closed
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
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
erichkeane wrote:
I think I've got everything done you were concerned about. Let me know if you
see anything else!
https://github.com/llvm/llvm-project/pull/89639
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -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,
@@ -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
@@ -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
@@ -3413,8 +3413,8 @@ StringRef BuiltinType::getName(const PrintingPolicy
) const {
return "reserve_id_t";
case IncompleteMatrixIdx:
return "";
- case OMPArraySection:
-return "";
+ case ArraySection:
+return "";
erichkeane wrote:
@@ -11762,20 +11770,25 @@
TreeTransform::TransformOMPArraySectionExpr(OMPArraySectionExpr *E) {
}
ExprResult Stride;
- if (Expr *Str = E->getStride()) {
-Stride = getDerived().TransformExpr(Str);
-if (Stride.isInvalid())
- return ExprError();
+ if
@@ -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
https://github.com/erichkeane edited
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
https://github.com/erichkeane commented:
I opted to leave the type of both array sections the same as it seems like it
will save a bunch of work and complexity, at the expense of 1 'print', and
potentially 1 diagnostic. Let me know if you think this is an important
distinction!
erichkeane 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
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
>
erichkeane 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
functions
erichkeane wrote:
@njames93 : My test failure has to do with the "NodeIntrospection" stuff that
you seemed to review ~3 years ago: https://reviews.llvm.org/D93164
At the moment, I cannot even figure out how to get it to build, but I suspect
it is getting confused in some way by having a
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/89639
>From b95304b22915217ad149c1b22a6517c585067acf Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Mon, 22 Apr 2024 10:35:13 -0700
Subject: [PATCH 1/3] [NFC] Factor out common parts of ArraySections into its
own
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
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/89639
>From b95304b22915217ad149c1b22a6517c585067acf Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Mon, 22 Apr 2024 10:35:13 -0700
Subject: [PATCH 1/2] [NFC] Factor out common parts of ArraySections into its
own
@@ -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
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff dc20a0ea1fd04a2ef95eb5c73e9f88357fc5f694
b95304b22915217ad149c1b22a6517c585067acf --
erichkeane wrote:
Note: this is one of my approaches. This ends up touching the OpenMP work 'the
least' (in that this is the entirety of the OpenMP changes as best I can tell),
at the expense of more work/a separate AST Node for OpenACC.
The OTHER approach I have is to move/rename
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Erich Keane (erichkeane)
Changes
OpenACC is going to need an array sections implementation that is a simpler
version/more restrictive version of the OpenMP version. This patch extracts
the things that should be common between the two
https://github.com/erichkeane created
https://github.com/llvm/llvm-project/pull/89639
OpenACC is going to need an array sections implementation that is a simpler
version/more restrictive version of the OpenMP version. This patch extracts
the things that should be common between the two into
33 matches
Mail list logo