File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
mlir/lib/Target/LLVMIR/Dialect/OpenMP Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -3300,9 +3300,20 @@ static void collectMapDataFromMapOperands(
33003300 // rematerialized, so the address of the decriptor for a given object
33013301 // may change from one place to another.
33023302 mapData.Types .push_back (mapType);
3303+ // Technically it's possible for a non-descriptor mapping to have
3304+ // both has-device-addr and ALWAYS, so lookup the mapper in case it
3305+ // exists.
3306+ if (mapOp.getMapperId ()) {
3307+ mapData.Mappers .push_back (
3308+ SymbolTable::lookupNearestSymbolFrom<omp::DeclareMapperOp>(
3309+ mapOp, mapOp.getMapperIdAttr ()));
3310+ } else {
3311+ mapData.Mappers .push_back (nullptr );
3312+ }
33033313 } else {
33043314 mapData.Types .push_back (
33053315 llvm::omp::OpenMPOffloadMappingFlags::OMP_MAP_LITERAL);
3316+ mapData.Mappers .push_back (nullptr );
33063317 }
33073318 mapData.Names .push_back (LLVM::createMappingInformation (
33083319 mapOp.getLoc (), *moduleTranslation.getOpenMPBuilder ()));
You can’t perform that action at this time.
0 commit comments