Skip to content

Commit 7c96eac

Browse files
authored
[OpenACC] Add NYI for pointer/VLA arguments to recipes (llvm#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.
1 parent 51a1aab commit 7c96eac

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

clang/lib/CIR/CodeGen/CIRGenOpenACCClause.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,20 @@ class OpenACCClauseCIREmitter final
595595
OpenACCReductionOperator reductionOp,
596596
DeclContext *dc, QualType baseType,
597597
mlir::Value mainOp) {
598+
599+
if (baseType->isPointerType() ||
600+
(baseType->isArrayType() && !baseType->isConstantArrayType())) {
601+
// It is clear that the use of pointers/VLAs in a recipe are not properly
602+
// generated/don't do what they are supposed to do. In the case where we
603+
// have 'bounds', we can actually figure out what we want to
604+
// initialize/copy/destroy/compare/etc, but we haven't figured out how
605+
// that looks yet, both between the IR and generation code. For now, we
606+
// will do an NYI error no it.
607+
cgf.cgm.errorNYI(
608+
varRef->getSourceRange(),
609+
"OpenACC recipe generation for pointer/non-constant arrays");
610+
}
611+
598612
mlir::ModuleOp mod = builder.getBlock()
599613
->getParent()
600614
->template getParentOfType<mlir::ModuleOp>();

0 commit comments

Comments
 (0)