[llvm-branch-commits] [flang] [llvm] [mlir] [OpenMP][MLIR] Modify OpenMP Dialect lowering to support attach mapping (PR #179023)
Pranav Bhandarkar via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Apr 2 13:48:21 PDT 2026
================
@@ -4587,10 +4601,16 @@ static void collectMapDataFromMapOperands(
// Process MapOperands
for (Value mapValue : mapVars) {
auto mapOp = cast<omp::MapInfoOp>(mapValue.getDefiningOp());
- Value offloadPtr =
- mapOp.getVarPtrPtr() ? mapOp.getVarPtrPtr() : mapOp.getVarPtr();
+ bool isRefPtrOrPteeMapWithAttach =
+ checkRefPtrOrPteeMapWithAttach(mapOp.getMapType());
+ Value offloadPtr = (mapOp.getVarPtrPtr() && !isRefPtrOrPteeMapWithAttach)
----------------
bhandarkar-pranav wrote:
This concerns me. For too long, I have been confused about what the offloadPtr in a `MapOp` is. I have a feeling in most cases it is mapOp.getVarPtr(). How about we formalize this in a method in MapOp itself? The concern is if this logic is inlined somewhere else, then we'll have to make sure in both cases this `?` operator is consistent. It would be handy to have
```
Value offloadPtr = mapOp.getOffloadPtr()
```
https://github.com/llvm/llvm-project/pull/179023
More information about the llvm-branch-commits
mailing list