[flang-commits] [flang] [flang][cuda] Add fir.cuda_allocate operation (PR #88586)

Valentin Clement バレンタイン クレメン via flang-commits flang-commits at lists.llvm.org
Tue Apr 16 09:55:25 PDT 2024


================
@@ -3993,6 +3993,25 @@ mlir::LogicalResult fir::CUDAKernelOp::verify() {
   return mlir::success();
 }
 
+mlir::LogicalResult fir::CUDAAllocateOp::verify() {
+  if (getPinned() && getStream())
+    return emitOpError("pinned and stream cannot appears at the same time");
+  if (!fir::unwrapRefType(getBox().getType()).isa<fir::BaseBoxType>())
+    return emitOpError(
+        "expect box to be a reference to/or a class or box type value");
----------------
clementval wrote:

Addressed in #88930 

https://github.com/llvm/llvm-project/pull/88586


More information about the flang-commits mailing list