[llvm-branch-commits] [OpenMP][MLIR] Descriptor explicit member map lowering changes (PR #111191)
Sergio Afonso via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Oct 22 04:44:50 PDT 2024
================
@@ -2764,7 +2782,12 @@ static void processMapMembersWithParent(
mapData.DevicePointers[memberDataIdx]);
combinedInfo.Names.emplace_back(
LLVM::createMappingInformation(memberClause.getLoc(), ompBuilder));
- combinedInfo.BasePointers.emplace_back(mapData.BasePointers[mapDataIndex]);
+ if (checkIfPointerMap(memberClause))
+ combinedInfo.BasePointers.emplace_back(
+ mapData.BasePointers[memberDataIdx]);
+ else
+ combinedInfo.BasePointers.emplace_back(
+ mapData.BasePointers[mapDataIndex]);
----------------
skatrak wrote:
Nit: Consider refactoring this a bit, since at the moment it's a bit difficult to tell at first glance what the difference is between the two branches. Feel free to ignore if you disagree.
```suggestion
uint64_t basePointerIndex = checkIfPointerMap(memberClause)? memberDataIdx : mapDataIndex;
combinedInfo.BasePointers.emplace_back(mapData.BasePointers[basePointerIndex]);
```
https://github.com/llvm/llvm-project/pull/111191
More information about the llvm-branch-commits
mailing list