[flang-commits] [flang] [flang][cuda] Use fir.cuda_deallocate for automatic deallocation (PR #89662)

Valentin Clement バレンタイン クレメン via flang-commits flang-commits at lists.llvm.org
Mon Apr 22 13:58:03 PDT 2024


================
@@ -4187,21 +4187,24 @@ void Fortran::lower::attachDeclarePostDeallocAction(
 
   std::stringstream fctName;
   fctName << converter.mangleName(sym) << declarePostDeallocSuffix.str();
-  mlir::Operation &op = builder.getInsertionBlock()->back();
-  if (op.hasAttr(mlir::acc::getDeclareActionAttrName())) {
-    auto attr = op.getAttrOfType<mlir::acc::DeclareActionAttr>(
+  mlir::Operation *op = &builder.getInsertionBlock()->back();
+  if (mlir::isa<fir::ResultOp>(*op))
----------------
clementval wrote:

Sure I'll add it. 

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


More information about the flang-commits mailing list