[Mlir-commits] [mlir] [mlir][spirv] Add a generic `convert-to-spirv` pass (PR #95942)

Ivan Butygin llvmlistbot at llvm.org
Tue Jun 18 11:02:04 PDT 2024


================
@@ -31,6 +30,20 @@ def ConvertToLLVMPass : Pass<"convert-to-llvm"> {
   ];
 }
 
+//===----------------------------------------------------------------------===//
+// ToSPIRV
+//===----------------------------------------------------------------------===//
+
+def ConvertToSPIRVPass : Pass<"convert-to-spirv"> {
+  let summary = "Convert to SPIR-V";
+  let description = [{
+    This is a generic pass to convert to SPIR-V.
+  }];
+
+  let constructor = "mlir::createConvertToSPIRVPass()";
----------------
Hardcode84 wrote:

I think, current preferred style is without explicit `let constructor =` so tablegen will generate the constructor function.

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


More information about the Mlir-commits mailing list