[llvm-branch-commits] [flang] [Flang][OpenMP] Derived type explicit allocatable member mapping (PR #96266)

Sergio Afonso via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Aug 12 08:42:17 PDT 2024


================
@@ -237,26 +436,34 @@ class OMPMapInfoFinalizationPass
 
     getOperation()->walk([&](mlir::omp::MapInfoOp op) {
       // TODO: Currently only supports a single user for the MapInfoOp, this
-      // is fine for the moment as the Fortran Frontend will generate a
-      // new MapInfoOp per Target operation for the moment. However, when/if
-      // we optimise/cleanup the IR, it likely isn't too difficult to
-      // extend this function, it would require some modification to create a
-      // single new MapInfoOp per new MapInfoOp generated and share it across
-      // all users appropriately, making sure to only add a single member link
-      // per new generation for the original originating descriptor MapInfoOp.
+      // is fine for the moment as the Fortran frontend will generate a
+      // new MapInfoOp with at most one user currently, in the case of
+      // members of other objects like derived types, the user would be the
+      // parent, in cases where it's a regular non-member map the user would
+      // be the target operation it is being mapped by.
----------------
skatrak wrote:

```suggestion
      // is fine for the moment, as the Fortran frontend will generate a
      // new MapInfoOp with at most one user currently. In the case of
      // members of other objects, like derived types, the user would be the
      // parent. In cases where it's a regular non-member map, the user would
      // be the target operation it is being mapped by.
```

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


More information about the llvm-branch-commits mailing list