[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
================
@@ -893,42 +917,68 @@ mlir::Value OpenACCMappableModel<Ty>::generatePrivateInit(
retVal = box;
}
}
+ }
+
+ if (isOptional) {
+ fir::ResultOp::create(builder, loc, retVal);
+ builder.setInsertionPointToStart(&optIfOp->getElseRegion().front());
+ mlir::Value zero = fir::ZeroOp::create(builder, loc, type);
----------------
jeanPerier wrote:
fir::AbsentOp is more idiomatic (although with the chosen implementation of OPTIONAL it is equivalent in the end).
https://github.com/llvm/llvm-project/pull/185764
More information about the Mlir-commits
mailing list