[flang-commits] [flang] [Flang][OpenMP] Support iterator modifier in map and motion clauses (PR #197757)
via flang-commits
flang-commits at lists.llvm.org
Tue Aug 4 19:49:05 PDT 2026
================
@@ -1387,6 +1391,8 @@ class MapInfoFinalizationPass
// is executed again as the final step of this pass to maintain
// map to block argument consistency.
func->walk([&](mlir::omp::MapInfoOp op) {
+ if (isNestedInIterator(op))
----------------
MattPD wrote:
`getFirstTargetUser` returns null for every iterator-nested map since the `YieldOp` hop was removed. Several walks assert on its result, so each walk has to skip iterator-nested maps on its own. Four walks carry this guard, at lines 1394, 1404, 1607 and 1704. The `MapInfoOp` walks at lines 1598 and 1634 do not. Neither of those fires for an iterator map today, because the first requires a record type and the second requires members, so this is hardening rather than a live bug.
Could every `MapInfoOp` walk share one filtered walk helper instead of keeping separate guards?
https://github.com/llvm/llvm-project/pull/197757
More information about the flang-commits
mailing list