[Mlir-commits] [flang] [mlir] [acc] Support for Optionals in firstprivate recipes. (PR #185764)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Mar 11 01:56:42 PDT 2026
================
@@ -387,7 +387,8 @@ def OpenACC_MappableTypeInterface : TypeInterface<"MappableType"> {
"::llvm::StringRef":$varName,
"::mlir::ValueRange":$extents,
"::mlir::Value":$initVal,
- "bool &":$needsDestroy),
+ "bool &":$needsDestroy,
+ "bool":$isOptional),
----------------
jeanPerier wrote:
I agree it would be best not to expose this in the interface, the solution, like for most other cases detecting OPTIONAL at the FIR level is to have it in the type system.
I think it is OK to not have the argument and to rely on something like `isOptionalVariable` in generatePrivateInit to detect OPTIONAL for now. It will be made simpler and more robust when OPTIONAL is reflected in the type system.
https://github.com/llvm/llvm-project/pull/185764
More information about the Mlir-commits
mailing list