[Mlir-commits] [flang] [mlir] [flang][OpenACC] Fix implicit data mapping for deviceptr inside host_data (PR #192710)

Razvan Lupusoru llvmlistbot at llvm.org
Wed Apr 29 07:22:58 PDT 2026


================
@@ -40,6 +42,15 @@ struct PartialEntityAccessModel
   bool isCompleteView(mlir::Operation *op) const { return false; }
 };
 
+// Full specialization for EmboxOp - complete view (embox wraps the full ref)
+template <>
+struct PartialEntityAccessModel<fir::EmboxOp>
----------------
razvanlupusoru wrote:

The PartialEntityAccessModel was primarily introduced to allow OpenACC implicit mapping to determine appropriate parent relationships and find the "base" entity such as parent of struct fields and array elements. It is also attached to fir.declare since we needed to find base storage in case of common blocks. However, attaching it to fir::EmboxOp is a bit of a stretch and I am not sure it is appropriate because this interface was not intended to be a replacement for ViewLikeOpInterface or FortranObjectViewOpInterface. Just so I can understand properly - you are attaching this because you want to be able to walk it during ACCImplicitData and you don't have access to any FIR specific logic or FortranObjectViewInterface. But I don't understand why you need any backward (or forward) walks in the first place and why the existing approach doesn't work. It would help me understand the need for this once you walk me through the AA changes you tried to make and why they were inadequate.

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


More information about the Mlir-commits mailing list