================
@@ -743,6 +800,37 @@ class MapInfoFinalizationPass
         return mlir::WalkResult::advance();
       });
 
+      func->walk([&](mlir::omp::MapInfoOp op) {
+        if (!op.getMembers().empty())
+          return;
+
+        if (!mlir::isa<fir::BoxCharType>(fir::unwrapRefType(op.getVarType())))
+          return;
+
+        // POSSIBLE_HACK_ALERT: If the boxchar has been implicitly mapped then
+        // it is likely that the underlying pointer to the data
----------------
agozillon wrote:

I think as long as it's the same address, the runtime wouldn't necessarily 
invoke another data transferal, just bump the ref counter, so it wouldn't be 
too costly in these cases I think! But it is nice to avoid generating extra 
maps where feasible :-)  

https://github.com/llvm/llvm-project/pull/141715
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to