[llvm-branch-commits] [flang] [flang][fir] Basic PFT to MLIR lowering for do concurrent locality specifiers (PR #138534)

Kareem Ergawy via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed May 7 00:25:10 PDT 2025


================
@@ -2029,9 +2031,30 @@ class FirConverter : public Fortran::lower::AbstractConverter {
   void handleLocalitySpecs(const IncrementLoopInfo &info) {
     Fortran::semantics::SemanticsContext &semanticsContext =
         bridge.getSemanticsContext();
-    for (const Fortran::semantics::Symbol *sym : info.localSymList)
+    Fortran::lower::omp::DataSharingProcessor dsp(
+        *this, semanticsContext, getEval(),
+        /*useDelayedPrivatization=*/true, localSymbols);
+    fir::LocalitySpecifierOperands privateClauseOps;
+    auto doConcurrentLoopOp =
+        mlir::dyn_cast_if_present<fir::DoConcurrentLoopOp>(info.loopOp);
+    bool useDelayedPriv =
----------------
ergawy wrote:

Similar to delayed privatization in OpenMP, I am planning to promote this to the non-staging flag (which is enable by default) once we have the stack merged. Just to make it less costly to hide it back behind the staging flag if we discover problems in the wild. Added a TODO.

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


More information about the llvm-branch-commits mailing list