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

#ifdef GEN_PASS_DECL
// Generate declarations for all passes.
#define GEN_PASS_DECL_FOLDTENSORSUBSETOPSPASS
#undef GEN_PASS_DECL
#endif // GEN_PASS_DECL

//===----------------------------------------------------------------------===//
// FoldTensorSubsetOpsPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_FOLDTENSORSUBSETOPSPASS
std::unique_ptr<::mlir::Pass> createFoldTensorSubsetOpsPass();
#undef GEN_PASS_DECL_FOLDTENSORSUBSETOPSPASS
#endif // GEN_PASS_DECL_FOLDTENSORSUBSETOPSPASS
#ifdef GEN_PASS_DEF_FOLDTENSORSUBSETOPSPASS

namespace impl {
  std::unique_ptr<::mlir::Pass> createFoldTensorSubsetOpsPass();
} // namespace impl
namespace impl {

template <typename DerivedT>
class FoldTensorSubsetOpsPassBase : public ::mlir::OperationPass<> {
public:
  using Base = FoldTensorSubsetOpsPassBase;

  FoldTensorSubsetOpsPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
  FoldTensorSubsetOpsPassBase(const FoldTensorSubsetOpsPassBase &other) : ::mlir::OperationPass<>(other) {}
  FoldTensorSubsetOpsPassBase& operator=(const FoldTensorSubsetOpsPassBase &) = delete;
  FoldTensorSubsetOpsPassBase(FoldTensorSubsetOpsPassBase &&) = delete;
  FoldTensorSubsetOpsPassBase& operator=(FoldTensorSubsetOpsPassBase &&) = delete;
  ~FoldTensorSubsetOpsPassBase() = default;

  /// Returns the command-line argument attached to this pass.
  static constexpr ::llvm::StringLiteral getArgumentName() {
    return ::llvm::StringLiteral("fold-tensor-subset-ops");
  }
  ::llvm::StringRef getArgument() const override { return "fold-tensor-subset-ops"; }

  ::llvm::StringRef getDescription() const override { return "Fold tensor subset ops into producer/consumer ops"; }

  /// Returns the derived pass name.
  static constexpr ::llvm::StringLiteral getPassName() {
    return ::llvm::StringLiteral("FoldTensorSubsetOpsPass");
  }
  ::llvm::StringRef getName() const override { return "FoldTensorSubsetOpsPass"; }

  /// 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<affine::AffineDialect>();
    registry.insert<tensor::TensorDialect>();
    registry.insert<vector::VectorDialect>();
  }

  /// Explicitly declare the TypeID for this class. We declare an explicit private
  /// instantiation because Pass classes should only be visible by the current
  /// library.
  MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(FoldTensorSubsetOpsPassBase<DerivedT>)

protected:
private:

  friend std::unique_ptr<::mlir::Pass> createFoldTensorSubsetOpsPass() {
    return std::make_unique<DerivedT>();
  }
};
} // namespace impl

std::unique_ptr<::mlir::Pass> createFoldTensorSubsetOpsPass() {
  return impl::createFoldTensorSubsetOpsPass();
}
#undef GEN_PASS_DEF_FOLDTENSORSUBSETOPSPASS
#endif // GEN_PASS_DEF_FOLDTENSORSUBSETOPSPASS
#ifdef GEN_PASS_REGISTRATION

//===----------------------------------------------------------------------===//
// FoldTensorSubsetOpsPass Registration
//===----------------------------------------------------------------------===//

inline void registerFoldTensorSubsetOpsPass() {
  ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
    return createFoldTensorSubsetOpsPass();
  });
}

// Old registration code, kept for temporary backwards compatibility.
inline void registerFoldTensorSubsetOpsPassPass() {
  ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
    return createFoldTensorSubsetOpsPass();
  });
}

//===----------------------------------------------------------------------===//
// Tensor Registration
//===----------------------------------------------------------------------===//

inline void registerTensorPasses() {
  registerFoldTensorSubsetOpsPass();
}
#undef GEN_PASS_REGISTRATION
#endif // GEN_PASS_REGISTRATION
// Deprecated. Please use the new per-pass macros.
#ifdef GEN_PASS_CLASSES

template <typename DerivedT>
class FoldTensorSubsetOpsPassBase : public ::mlir::OperationPass<> {
public:
  using Base = FoldTensorSubsetOpsPassBase;

  FoldTensorSubsetOpsPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
  FoldTensorSubsetOpsPassBase(const FoldTensorSubsetOpsPassBase &other) : ::mlir::OperationPass<>(other) {}
  FoldTensorSubsetOpsPassBase& operator=(const FoldTensorSubsetOpsPassBase &) = delete;
  FoldTensorSubsetOpsPassBase(FoldTensorSubsetOpsPassBase &&) = delete;
  FoldTensorSubsetOpsPassBase& operator=(FoldTensorSubsetOpsPassBase &&) = delete;
  ~FoldTensorSubsetOpsPassBase() = default;

  /// Returns the command-line argument attached to this pass.
  static constexpr ::llvm::StringLiteral getArgumentName() {
    return ::llvm::StringLiteral("fold-tensor-subset-ops");
  }
  ::llvm::StringRef getArgument() const override { return "fold-tensor-subset-ops"; }

  ::llvm::StringRef getDescription() const override { return "Fold tensor subset ops into producer/consumer ops"; }

  /// Returns the derived pass name.
  static constexpr ::llvm::StringLiteral getPassName() {
    return ::llvm::StringLiteral("FoldTensorSubsetOpsPass");
  }
  ::llvm::StringRef getName() const override { return "FoldTensorSubsetOpsPass"; }

  /// 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));
  }

  /// Register the dialects that must be loaded in the context before this pass.
  void getDependentDialects(::mlir::DialectRegistry &registry) const override {
    registry.insert<affine::AffineDialect>();
    registry.insert<tensor::TensorDialect>();
    registry.insert<vector::VectorDialect>();
  }

  /// Explicitly declare the TypeID for this class. We declare an explicit private
  /// instantiation because Pass classes should only be visible by the current
  /// library.
  MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(FoldTensorSubsetOpsPassBase<DerivedT>)

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