[clang] [CIR][OpenACC] Implement PointerLikeType and PartialEntityAccessOpInterface (PR #244703)

Razvan Lupusoru via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 4 15:20:18 PST 2026


================
@@ -17,6 +17,42 @@
 
 namespace cir::acc {
 
+static mlir::Value getEnclosingObject(cir::GetMemberOp op) {
+  return op.getAddr();
+}
+static mlir::Value getEnclosingObject(cir::GetElementOp op) {
+  return op.getBase();
+}
+static mlir::Value getEnclosingObject(cir::GetRuntimeMemberOp op) {
+  return op.getAddr();
+}
+static mlir::Value getEnclosingObject(cir::BaseClassAddrOp op) {
+  return op.getSrcAddr();
+}
+static mlir::Value getEnclosingObject(cir::DerivedClassAddrOp op) {
+  return op.getSrcAddr();
----------------
razvanlupusoru wrote:

Thank you for that example, I decided to not attach the interface to either of the class casting operations. In general, I expect we would need to spend more time to analyze how to ensure proper data clause ordering and data mapping for class types, and thus the interface should only be considered at that time. The current design of this interface is primarily for clear cases like members and interior pointer computations. FYI @clementval 

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


More information about the cfe-commits mailing list