[llvm-branch-commits] [Flang][OpenMP][MLIR] Extend derived (record) type map support in Flang OpenMP by adding some initial support for explicit member mapping (PR #81511)

Kareem Ergawy via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Feb 14 06:26:09 PST 2024


================
@@ -1906,8 +2036,22 @@ bool ClauseProcessor::processMap(
 
         for (const Fortran::parser::OmpObject &ompObject :
              std::get<Fortran::parser::OmpObjectList>(mapClause->v.t).v) {
+          llvm::omp::OpenMPOffloadMappingFlags objectsMapTypeBits = mapTypeBits;
+          checkAndApplyDeclTargetMapFlags(converter, objectsMapTypeBits,
+                                          getOmpObjectSymbol(ompObject));
+
           llvm::SmallVector<mlir::Value> bounds;
           std::stringstream asFortran;
+          const Fortran::semantics::Symbol *parentSym = nullptr;
+
+          if (getOmpObjectSymbol(ompObject)->owner().IsDerivedType()) {
+            memberPlacementIndices.push_back(
+                firOpBuilder.getI64IntegerAttr(findComponenetMemberPlacement(
+                    getOmpObjectSymbol(ompObject)->owner().symbol(),
----------------
ergawy wrote:

Maybe a dummy question, but in which cases would `getOmpObjectSymbol(ompObject)->owner().symbol()` and `getOmpObjParentSymbol(ompObject)` would return different symbols? Can you give me an example for such a case?

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


More information about the llvm-branch-commits mailing list