[clang] 7c96eac - [OpenACC] Add NYI for pointer/VLA arguments to recipes (#156465)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 2 09:56:59 PDT 2025
Author: Erich Keane
Date: 2025-09-02T09:56:56-07:00
New Revision: 7c96eacbc7cbf319d743b3eb1491e1a48e4ec984
URL: https://github.com/llvm/llvm-project/commit/7c96eacbc7cbf319d743b3eb1491e1a48e4ec984
DIFF: https://github.com/llvm/llvm-project/commit/7c96eacbc7cbf319d743b3eb1491e1a48e4ec984.diff
LOG: [OpenACC] Add NYI for pointer/VLA arguments to recipes (#156465)
As mentioned in a previous review, we aren't properly generating
init/destroy/copy (combiner will need to be done correctly too!) regions
for recipe generation. In the case where these have 'bounds', we can do
a much better job of figuring out the type and how much needs to be
done, but that is going to be its own engineering effort.
For now, add an NYI as a note to come back to this.
Added:
Modified:
clang/lib/CIR/CodeGen/CIRGenOpenACCClause.cpp
Removed:
################################################################################
diff --git a/clang/lib/CIR/CodeGen/CIRGenOpenACCClause.cpp b/clang/lib/CIR/CodeGen/CIRGenOpenACCClause.cpp
index 37533368af4b2..98e71b6609f0d 100644
--- a/clang/lib/CIR/CodeGen/CIRGenOpenACCClause.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenOpenACCClause.cpp
@@ -595,6 +595,20 @@ class OpenACCClauseCIREmitter final
OpenACCReductionOperator reductionOp,
DeclContext *dc, QualType baseType,
mlir::Value mainOp) {
+
+ if (baseType->isPointerType() ||
+ (baseType->isArrayType() && !baseType->isConstantArrayType())) {
+ // It is clear that the use of pointers/VLAs in a recipe are not properly
+ // generated/don't do what they are supposed to do. In the case where we
+ // have 'bounds', we can actually figure out what we want to
+ // initialize/copy/destroy/compare/etc, but we haven't figured out how
+ // that looks yet, both between the IR and generation code. For now, we
+ // will do an NYI error no it.
+ cgf.cgm.errorNYI(
+ varRef->getSourceRange(),
+ "OpenACC recipe generation for pointer/non-constant arrays");
+ }
+
mlir::ModuleOp mod = builder.getBlock()
->getParent()
->template getParentOfType<mlir::ModuleOp>();
More information about the cfe-commits
mailing list