[flang-commits] [flang] [flang][OpenMP] Extend `do concurrent` mapping to device (PR #155987)

Pranav Bhandarkar via flang-commits flang-commits at lists.llvm.org
Mon Sep 8 22:00:30 PDT 2025


================
@@ -297,11 +422,19 @@ class DoConcurrentConversion
       bounds.push_back(var.getDefiningOp()->getResult(0));
     };
 
+    auto hostEvalCapture = [&](mlir::Value var,
+                               llvm::SmallVectorImpl<mlir::Value> &bounds) {
+      populateBounds(var, bounds);
+
+      if (targetClauseOps)
----------------
bhandarkar-pranav wrote:

<Suggestion/Nit> - I think it'd help to add a comment here that explains the need for host_eval i.e the omp.target needs to forward values defined above to an inner omp.loop_nest

https://github.com/llvm/llvm-project/pull/155987


More information about the flang-commits mailing list