[llvm-branch-commits] [OpenMP][MLIR] Extend explicit derived type member mapping support for OpenMP dialects lowering to LLVM-IR (PR #81510)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Feb 16 08:26:51 PST 2024
================
@@ -1783,6 +1783,98 @@ void collectMapDataFromMapOperands(MapInfoData &mapData,
}
}
+static int getMapDataMemberIdx(MapInfoData &mapData,
+ mlir::omp::MapInfoOp memberOp) {
+ int memberDataIdx = -1;
+ for (size_t i = 0; i < mapData.MapClause.size(); ++i) {
+ if (mapData.MapClause[i] == memberOp)
+ memberDataIdx = i;
+ }
+ return memberDataIdx;
+}
----------------
agozillon wrote:
Thank you, that's an excellent solution :-)
https://github.com/llvm/llvm-project/pull/81510
More information about the llvm-branch-commits
mailing list