[flang-commits] [flang] [Flang][OpenMP] Skip DSA for canonical loops (PR #150593)

Michael Kruse via flang-commits flang-commits at lists.llvm.org
Tue Jul 29 06:36:38 PDT 2025


================
@@ -1224,7 +1236,7 @@ static void createBodyOfOp(mlir::Operation &op, const OpWithBodyGenInfo &info,
   // code will use the right symbols.
   bool isLoop = llvm::omp::getDirectiveAssociation(info.dir) ==
                 llvm::omp::Association::Loop;
-  bool privatize = info.clauses;
+  bool privatize = info.clauses && info.privatize;
----------------
Meinersbur wrote:

Many things will have to be resolved when composing loop-transformations with other loop-associated constructs, which at the moment is not possible. As you know I reduced the scope of #144785 to incrementally add such features instead of have a single PR that handles everything perfectly, including avoid ing preemtive changes that I don't even know whether they are needed.

Loop transformations do not particpate in compound constructs and I think `genOMPDispatch`. That is, similar functionality is also needed for composing multiple transformations and possibly a non-transformation loop-associated construct at the end, but I don't know yet whether it will just reuse `genOMPDispatch`.

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


More information about the flang-commits mailing list