[Mlir-commits] [flang] [llvm] [mlir] [flang][OpenMP] Implicitly map allocatable record fields (PR #117867)
Leandro Lupori
llvmlistbot at llvm.org
Tue Dec 3 05:37:34 PST 2024
================
@@ -486,6 +490,157 @@ class MapInfoFinalizationPass
// iterations from previous function scopes.
localBoxAllocas.clear();
+ // First, walk `omp.map.info` ops to see if any record members should be
+ // implicitly mapped.
+ func->walk([&](mlir::omp::MapInfoOp op) {
+ mlir::Type underlyingType =
+ fir::unwrapRefType(op.getVarPtr().getType());
+
+ if (!fir::isRecordWithAllocatableMember(underlyingType))
----------------
luporl wrote:
I guess this won't work for all cases, as when `underlyingType` is an array of records, for instance.
It could be a TODO.
https://github.com/llvm/llvm-project/pull/117867
More information about the Mlir-commits
mailing list