[Openmp-commits] [openmp] [OpenMP] Introduce support for OMPX extensions and taskgraph frontend (PR #66919)

Jose Manuel Monsalve Diaz via Openmp-commits openmp-commits at lists.llvm.org
Thu Sep 28 08:02:09 PDT 2023


================
@@ -234,6 +236,26 @@ class CGOpenMPTaskOutlinedRegionInfo final : public CGOpenMPRegionInfo {
   const UntiedTaskActionTy &Action;
 };
 
+/// API for captured statement code generation in OpenMP taskgraphs.
+class CGOpenMPTaskgraphRegionInfo final : public CGOpenMPRegionInfo {
+public:
+  CGOpenMPTaskgraphRegionInfo(const CapturedStmt &CS,
+                              const RegionCodeGenTy &CodeGen)
+      : CGOpenMPRegionInfo(CS, TaskgraphOutlinedRegion, CodeGen,
+                           llvm::omp::OMPD_taskgraph, false) {}
+
+  const VarDecl *getThreadIDVariable() const override { return 0; }
+
+  /// Get the name of the capture helper.
+  StringRef getHelperName() const override { return "taskgraph.omp_outlined."; }
+
+  static bool classof(const CGCapturedStmtInfo *Info) {
+    return CGOpenMPRegionInfo::classof(Info) &&
+           cast<CGOpenMPRegionInfo>(Info)->getRegionKind() ==
+               TaskgraphOutlinedRegion;
+  }
+};
+
----------------
josemonsalve2 wrote:

@jdoerfert, I remember I mentioned to you using multiple patches for `ompx` and the feature. But you wanted to have `ompx` being landed with a use case. I think I agree with Alexey, but just want to check with you here.


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


More information about the Openmp-commits mailing list