[clang] [llvm] [Clang] [OpenMP] Add support for '#pragma omp stripe'. (PR #119891)

Zahira Ammarguellat via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 14 12:54:59 PST 2025


================
@@ -5621,6 +5623,81 @@ class OMPTileDirective final : public OMPLoopTransformationDirective {
   }
 };
 
+class OMPStripeDirective final : public OMPLoopTransformationDirective {
+  friend class ASTStmtReader;
+  friend class OMPExecutableDirective;
+
+  /// Default list of offsets.
+  enum {
+    PreInitsOffset = 0,
+    TransformedStmtOffset,
+  };
+
+  explicit OMPStripeDirective(SourceLocation StartLoc, SourceLocation EndLoc,
+                              unsigned NumLoops)
+      : OMPLoopTransformationDirective(OMPStripeDirectiveClass,
+                                       llvm::omp::OMPD_stripe, StartLoc, EndLoc,
+                                       NumLoops) {
+    setNumGeneratedLoops(3 * NumLoops);
----------------
zahiraam wrote:

Yes I am still trying to figure this out.
I came up with the same conclusion after reading the doc I mention above. But I am still not convinced yet.

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


More information about the llvm-commits mailing list