[llvm-branch-commits] [flang] [llvm] [mlir] [OpenMP][MLIR] Modify OpenMP Dialect lowering to support attach mapping (PR #179023)
Sergio Afonso via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Apr 6 08:28:47 PDT 2026
================
@@ -5106,40 +5295,55 @@ static llvm::omp::OpenMPOffloadMappingFlags mapParentWithMembers(
mapData.Pointers[mapDataIndex], 1),
builder.getPtrTy());
+ // Currently, the return parameter should be the over-riding parent in
+ // cases where we have a return parameter that is echoed to all members,
+ // the main case of this currently is with fortran descriptors. It may
+ // need more finessing for C/C++ in the future or descriptors that are
+ // members of derived types.
+ mapFlag &= ~llvm::omp::OpenMPOffloadMappingFlags::OMP_MAP_RETURN_PARAM;
+
// TODO: We may want to skip arrays/array sections in this as Clang does.
// It appears to be an optimisation rather than a necessity though,
// but this requires further investigation. However, we would have to make
// sure to not exclude maps with bounds that ARE pointers, as these are
- // processed as separate components, i.e. pointer + data.
+ // processed as seperate components, i.e. pointer + data.
----------------
skatrak wrote:
Nit: "separate" is the correct spelling.
https://github.com/llvm/llvm-project/pull/179023
More information about the llvm-branch-commits
mailing list