[llvm-branch-commits] [flang] [mlir] [mlir][flang][OpenMP] Select depend and affinity iterators per locator (PR #227454)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Oct 5 21:08:49 PDT 2026
================
@@ -1509,23 +1503,19 @@ bool ClauseProcessor::processDepend(lower::SymMap &symMap,
return dependVar;
};
- auto &iteratorModifier =
- std::get<std::optional<omp::clause::Iterator>>(clause.t);
-
- llvm::SmallVector<IteratorRange> iteratorRanges;
- llvm::SmallPtrSet<const Fortran::semantics::Symbol *, 4> ivSyms;
- collectIteratorIVs(clause, converter, stmtCtx, iteratorRanges, ivSyms);
+ auto iteratorRanges = lowerIteratorRanges(clause, converter, stmtCtx);
mlir::Type ptrTy =
mlir::LLVM::LLVMPointerType::get(&converter.getMLIRContext());
mlir::Type iterTy =
mlir::omp::IteratedType::get(&converter.getMLIRContext(), ptrTy);
for (const omp::Object &object : objects) {
- if (iteratorModifier.has_value() &&
- hasIteratorIVReference(object, ivSyms)) {
+ llvm::SmallVector<IteratorRange> objectRanges =
+ getIteratorRangesForObject(object, iteratorRanges);
+ if (!objectRanges.empty()) {
----------------
MattPD wrote:
The reported locators now produce the expected addresses, and affinity sections retain their full lengths.
https://github.com/llvm/llvm-project/pull/227454
More information about the llvm-branch-commits
mailing list