/* Autogenerated by mlir-tblgen; don't manually edit */
#ifdef GEN_PASS_CLASSES

//===----------------------------------------------------------------------===//
// AsyncParallelFor
//===----------------------------------------------------------------------===//

template <typename DerivedT>
class AsyncParallelForBase : public ::mlir::FunctionPass {
public:
  AsyncParallelForBase() : ::mlir::FunctionPass(::mlir::TypeID::get<DerivedT>()) {}
  AsyncParallelForBase(const AsyncParallelForBase &) : ::mlir::FunctionPass(::mlir::TypeID::get<DerivedT>()) {}

  /// Returns the command-line argument attached to this pass.
  ::llvm::StringRef getArgument() const override { return "async-parallel-for"; }

  /// Returns the derived pass name.
  ::llvm::StringRef getName() const override { return "AsyncParallelFor"; }

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    
  registry.insert<async::AsyncDialect>();

  registry.insert<scf::SCFDialect>();

  }

protected:
  ::mlir::Pass::Option<int32_t> numConcurrentAsyncExecute{*this, "num-concurrent-async-execute", ::llvm::cl::desc("The number of async.execute operations that will be used for concurrent loop execution."), ::llvm::cl::init(4)};
};

//===----------------------------------------------------------------------===//
// AsyncRefCounting
//===----------------------------------------------------------------------===//

template <typename DerivedT>
class AsyncRefCountingBase : public ::mlir::FunctionPass {
public:
  AsyncRefCountingBase() : ::mlir::FunctionPass(::mlir::TypeID::get<DerivedT>()) {}
  AsyncRefCountingBase(const AsyncRefCountingBase &) : ::mlir::FunctionPass(::mlir::TypeID::get<DerivedT>()) {}

  /// Returns the command-line argument attached to this pass.
  ::llvm::StringRef getArgument() const override { return "async-ref-counting"; }

  /// Returns the derived pass name.
  ::llvm::StringRef getName() const override { return "AsyncRefCounting"; }

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    
  registry.insert<async::AsyncDialect>();

  }

protected:
};

//===----------------------------------------------------------------------===//
// AsyncRefCountingOptimization
//===----------------------------------------------------------------------===//

template <typename DerivedT>
class AsyncRefCountingOptimizationBase : public ::mlir::FunctionPass {
public:
  AsyncRefCountingOptimizationBase() : ::mlir::FunctionPass(::mlir::TypeID::get<DerivedT>()) {}
  AsyncRefCountingOptimizationBase(const AsyncRefCountingOptimizationBase &) : ::mlir::FunctionPass(::mlir::TypeID::get<DerivedT>()) {}

  /// Returns the command-line argument attached to this pass.
  ::llvm::StringRef getArgument() const override { return "async-ref-counting-optimization"; }

  /// Returns the derived pass name.
  ::llvm::StringRef getName() const override { return "AsyncRefCountingOptimization"; }

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    
  registry.insert<async::AsyncDialect>();

  }

protected:
};

//===----------------------------------------------------------------------===//
// AsyncToAsyncRuntime
//===----------------------------------------------------------------------===//

template <typename DerivedT>
class AsyncToAsyncRuntimeBase : public ::mlir::OperationPass<ModuleOp> {
public:
  AsyncToAsyncRuntimeBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  AsyncToAsyncRuntimeBase(const AsyncToAsyncRuntimeBase &) : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}

  /// Returns the command-line argument attached to this pass.
  ::llvm::StringRef getArgument() const override { return "async-to-async-runtime"; }

  /// Returns the derived pass name.
  ::llvm::StringRef getName() const override { return "AsyncToAsyncRuntime"; }

  /// Support isa/dyn_cast functionality for the derived pass class.
  static bool classof(const ::mlir::Pass *pass) {
    return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
  }

  /// A clone method to create a copy of this pass.
  std::unique_ptr<::mlir::Pass> clonePass() const override {
    return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
  }

  /// Return the dialect that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    
  registry.insert<async::AsyncDialect>();

  }

protected:
};
#undef GEN_PASS_CLASSES
#endif // GEN_PASS_CLASSES
#ifdef GEN_PASS_REGISTRATION

//===----------------------------------------------------------------------===//
// AsyncParallelFor Registration
//===----------------------------------------------------------------------===//

inline void registerAsyncParallelForPass() {
  ::mlir::registerPass("async-parallel-for", "Convert scf.parallel operations to multiple async regions executed concurrently for non-overlapping iteration ranges", []() -> std::unique_ptr<::mlir::Pass> {
    return mlir::createAsyncParallelForPass();
  });
}

//===----------------------------------------------------------------------===//
// AsyncRefCounting Registration
//===----------------------------------------------------------------------===//

inline void registerAsyncRefCountingPass() {
  ::mlir::registerPass("async-ref-counting", "Automatic reference counting for Async dialect data types", []() -> std::unique_ptr<::mlir::Pass> {
    return mlir::createAsyncRefCountingPass();
  });
}

//===----------------------------------------------------------------------===//
// AsyncRefCountingOptimization Registration
//===----------------------------------------------------------------------===//

inline void registerAsyncRefCountingOptimizationPass() {
  ::mlir::registerPass("async-ref-counting-optimization", "Optimize automatic reference counting operations for theAsync dialect by removing redundant operations", []() -> std::unique_ptr<::mlir::Pass> {
    return mlir::createAsyncRefCountingOptimizationPass();
  });
}

//===----------------------------------------------------------------------===//
// AsyncToAsyncRuntime Registration
//===----------------------------------------------------------------------===//

inline void registerAsyncToAsyncRuntimePass() {
  ::mlir::registerPass("async-to-async-runtime", "Lower high level async operations (e.g. async.execute) to theexplicit async.rutime and async.coro operations", []() -> std::unique_ptr<::mlir::Pass> {
    return mlir::createAsyncToAsyncRuntimePass();
  });
}

//===----------------------------------------------------------------------===//
// Async Registration
//===----------------------------------------------------------------------===//

inline void registerAsyncPasses() {
  registerAsyncParallelForPass();
  registerAsyncRefCountingPass();
  registerAsyncRefCountingOptimizationPass();
  registerAsyncToAsyncRuntimePass();
}
#undef GEN_PASS_REGISTRATION
#endif // GEN_PASS_REGISTRATION
