================
@@ -48,6 +49,29 @@ using DeclareTargetCapturePair =
 // Common helper functions
 
//===----------------------------------------------------------------------===//
 
+static llvm::ArrayRef<llvm::omp::Directive> getWorksharing() {
+  static llvm::omp::Directive worksharing[] = {
+      llvm::omp::Directive::OMPD_do,     llvm::omp::Directive::OMPD_for,
+      llvm::omp::Directive::OMPD_scope,  llvm::omp::Directive::OMPD_sections,
+      llvm::omp::Directive::OMPD_single, llvm::omp::Directive::OMPD_workshare,
+  };
+  return worksharing;
+}
+
+static llvm::ArrayRef<llvm::omp::Directive> getWorksharingLoop() {
+  static llvm::omp::Directive worksharingLoop[] = {
+      llvm::omp::Directive::OMPD_do,
+      llvm::omp::Directive::OMPD_for,
+  };
+  return worksharingLoop;
+}
+
+static uint32_t getOpenMPVersion(const mlir::ModuleOp &mod) {
+  if (mlir::Attribute verAttr = mod->getAttr("omp.version"))
+    return llvm::cast<mlir::omp::VersionAttr>(verAttr).getVersion();
+  llvm_unreachable("Exoecting OpenMP version attribute in module");
----------------
clementval wrote:

```suggestion
  llvm_unreachable("Expecting OpenMP version attribute in module");
```

https://github.com/llvm/llvm-project/pull/82003
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
  • [... Krzysztof Parzyszek via llvm-branch-commits
    • ... via llvm-branch-commits
    • ... Krzysztof Parzyszek via llvm-branch-commits
    • ... Krzysztof Parzyszek via llvm-branch-commits
    • ... Krzysztof Parzyszek via llvm-branch-commits
    • ... Valentin Clement バレンタイン クレメン via llvm-branch-commits
    • ... Krzysztof Parzyszek via llvm-branch-commits
    • ... Krzysztof Parzyszek via llvm-branch-commits

Reply via email to