[flang-commits] [flang] [flang][OpenMP] WIP: Rewrite `omp.loop` to semantically equivalent ops (PR #115443)

Kareem Ergawy via flang-commits flang-commits at lists.llvm.org
Sun Nov 17 23:37:03 PST 2024


================
@@ -50,4 +50,16 @@ def FunctionFilteringPass : Pass<"omp-function-filtering"> {
   ];
 }
 
+def GenericLoopConversionPass
+    : Pass<"omp-generic-loop-conversion", "mlir::func::FuncOp"> {
+  let summary = "Converts OpenMP generic `loop` direcitve to semantically "
+                "equivalent OpenMP ops";
+  let description = [{
+     Rewrites `loop` ops to their semantically equivalent nest of ops. The
+     rewrite depends on the nesting/combination structure of the `loop` op
+     within its surrounding context as well as its `bind` clause value.
+  }];
+  let dependentDialects = ["mlir::omp::OpenMPDialect"];
----------------
ergawy wrote:

This affect the generated implementation of `getDependentDialects(::mlir::DialectRegistry &registry)` which is used by when constructing the MLIR context to load the required dialects for a certain pipeline. Even though `FuncDialect` is loaded by a lot of passes, I think you are right, we should specify it here in any case.

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


More information about the flang-commits mailing list