[flang-commits] [flang] [flang][cuda] Lower DEALLOCATE for device variables (PR #89091)
Valentin Clement バレンタイン クレメン via flang-commits
flang-commits at lists.llvm.org
Wed Apr 17 09:13:40 PDT 2024
================
@@ -799,17 +799,40 @@ static void postDeallocationAction(Fortran::lower::AbstractConverter &converter,
Fortran::lower::attachDeclarePostDeallocAction(converter, builder, sym);
}
+static mlir::Value genCudaDeallocate(fir::FirOpBuilder &builder,
+ mlir::Location loc,
+ const fir::MutableBoxValue &box,
+ ErrorManager &errorManager,
+ const Fortran::semantics::Symbol &sym) {
+ fir::CUDADataAttributeAttr cudaAttr =
+ Fortran::lower::translateSymbolCUDADataAttribute(builder.getContext(),
+ sym);
+ mlir::Value errmsg =
+ mlir::isa<fir::AbsentOp>(errorManager.errMsgAddr.getDefiningOp())
----------------
clementval wrote:
The reason it is different is that this function is not a member function from the `AllocateStmtHelper` so there is no access to `errMsgExpr`. I can update the check in the genCudaAllocate function to match this one.
https://github.com/llvm/llvm-project/pull/89091
More information about the flang-commits
mailing list