[llvm-branch-commits] [flang] [Flang][OpenMP][MLIR] Initial derived type member map support (PR #82853)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Apr 24 09:20:25 PDT 2024
================
@@ -903,24 +908,39 @@ bool ClauseProcessor::processMap(
// Explicit map captures are captured ByRef by default,
// optimisation passes may alter this to ByCopy or other capture
// types to optimise
- mlir::Value mapOp = createMapInfoOp(
+ mlir::omp::MapInfoOp mapOp = createMapInfoOp(
firOpBuilder, clauseLocation, symAddr, mlir::Value{},
- asFortran.str(), bounds, {},
+ asFortran.str(), bounds, {}, mlir::DenseIntElementsAttr{},
static_cast<
std::underlying_type_t<llvm::omp::OpenMPOffloadMappingFlags>>(
mapTypeBits),
mlir::omp::VariableCaptureKind::ByRef, symAddr.getType());
- result.mapVars.push_back(mapOp);
-
- if (mapSyms)
+ if (object.id()->owner().IsDerivedType()) {
+ if (auto dataRef{ExtractDataRef(object.designator)}) {
----------------
agozillon wrote:
It's expected behavior as there's nothing we can really do without the information, we'd be missing the parent symbol required to perform the next steps unfortunately. So I'll emit an assert in this case, as there likely is no fallback (at least that I can think of).
https://github.com/llvm/llvm-project/pull/82853
More information about the llvm-branch-commits
mailing list