[Mlir-commits] [mlir] [mlir][SPIR-V] Update the `ConvertToSPIRV` pass to use dialect interfaces (PR #102046)

Ivan Butygin llvmlistbot at llvm.org
Mon Aug 5 17:54:20 PDT 2024


================
@@ -1367,3 +1369,39 @@ struct ConvertArithToSPIRVPass
 std::unique_ptr<OperationPass<>> mlir::arith::createConvertArithToSPIRVPass() {
   return std::make_unique<ConvertArithToSPIRVPass>();
 }
+
+//===----------------------------------------------------------------------===//
+// ConvertToSPIRVPatternInterface implementation
+//===----------------------------------------------------------------------===//
+namespace {
+/// Implement the interface to convert arith to SPIR-V.
+struct ToSPIRVDialectInterface : public ConvertToSPIRVPatternInterface {
+  using ConvertToSPIRVPatternInterface::ConvertToSPIRVPatternInterface;
+  void loadDependentDialects(MLIRContext *context) const final {
----------------
Hardcode84 wrote:

Here and later: `override`

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


More information about the Mlir-commits mailing list