[flang-commits] [flang] [Flang][OpenMP] Fix nested OpenMP mapper composition (PR #215639)
Akash Banerjee via flang-commits
flang-commits at lists.llvm.org
Wed Aug 12 09:56:01 PDT 2026
================
@@ -138,6 +138,75 @@ class MapInfoFinalizationPass
return findMemberByIndexPath(op, indexPath) != nullptr;
}
+ static bool mapperCoversIndexPath(
+ mlir::Operation *symbolTableAnchor, mlir::FlatSymbolRefAttr mapperId,
+ llvm::ArrayRef<int64_t> indexPath,
+ llvm::SmallPtrSetImpl<mlir::Operation *> &visitedMappers) {
+ mlir::omp::DeclareMapperOp symbol =
+ mlir::SymbolTable::lookupNearestSymbolFrom<mlir::omp::DeclareMapperOp>(
+ symbolTableAnchor, mapperId);
+ if (!symbol || !visitedMappers.insert(symbol.getOperation()).second)
+ return false;
----------------
TIFitis wrote:
@agozillon This concern seemed genuine, so I've updated the PR along with the test. Let me know if you are happy with the new changes, thanks.
https://github.com/llvm/llvm-project/pull/215639
More information about the flang-commits
mailing list