[llvm-branch-commits] [flang] [flang] Lower omp.workshare to other omp constructs (PR #101446)

Tom Eccles via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Aug 1 03:34:55 PDT 2024


================
@@ -792,7 +793,8 @@ struct ElementalOpConversion
     // Generate a loop nest looping around the fir.elemental shape and clone
     // fir.elemental region inside the inner loop.
     hlfir::LoopNest loopNest =
-        hlfir::genLoopNest(loc, builder, extents, !elemental.isOrdered());
+        hlfir::genLoopNest(loc, builder, extents, !elemental.isOrdered(),
+                           flangomp::shouldUseWorkshareLowering(elemental));
----------------
tblah wrote:

I'm a bit worried about hlfir.elementals with the isOrdered flag being lowered as workshare loops. This could happen for example for elemental calls of impure functions. Does the standard say how these should be handled?

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


More information about the llvm-branch-commits mailing list