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

#ifdef GEN_PASS_DECL
// Generate declarations for all passes.
#define GEN_PASS_DECL_SPIRVCANONICALIZEGLPASS
#define GEN_PASS_DECL_SPIRVCOMPOSITETYPELAYOUTPASS
#define GEN_PASS_DECL_SPIRVLOWERABIATTRIBUTESPASS
#define GEN_PASS_DECL_SPIRVREWRITEINSERTSPASS
#define GEN_PASS_DECL_SPIRVUNIFYALIASEDRESOURCEPASS
#define GEN_PASS_DECL_SPIRVUPDATEVCEPASS
#define GEN_PASS_DECL_SPIRVWEBGPUPREPAREPASS
#undef GEN_PASS_DECL
#endif // GEN_PASS_DECL

//===----------------------------------------------------------------------===//
// SPIRVCanonicalizeGLPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_SPIRVCANONICALIZEGLPASS
std::unique_ptr<::mlir::Pass> createSPIRVCanonicalizeGLPass();
#undef GEN_PASS_DECL_SPIRVCANONICALIZEGLPASS
#endif // GEN_PASS_DECL_SPIRVCANONICALIZEGLPASS
#ifdef GEN_PASS_DEF_SPIRVCANONICALIZEGLPASS

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

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

  SPIRVCanonicalizeGLPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
  SPIRVCanonicalizeGLPassBase(const SPIRVCanonicalizeGLPassBase &other) : ::mlir::OperationPass<>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Canonicalize GLSL ops"; }

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

  /// 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 {
    
  }

  /// 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(SPIRVCanonicalizeGLPassBase<DerivedT>)

protected:
private:

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

std::unique_ptr<::mlir::Pass> createSPIRVCanonicalizeGLPass() {
  return impl::createSPIRVCanonicalizeGLPass();
}
#undef GEN_PASS_DEF_SPIRVCANONICALIZEGLPASS
#endif // GEN_PASS_DEF_SPIRVCANONICALIZEGLPASS

//===----------------------------------------------------------------------===//
// SPIRVCompositeTypeLayoutPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_SPIRVCOMPOSITETYPELAYOUTPASS
std::unique_ptr<::mlir::Pass> createSPIRVCompositeTypeLayoutPass();
#undef GEN_PASS_DECL_SPIRVCOMPOSITETYPELAYOUTPASS
#endif // GEN_PASS_DECL_SPIRVCOMPOSITETYPELAYOUTPASS
#ifdef GEN_PASS_DEF_SPIRVCOMPOSITETYPELAYOUTPASS

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

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

  SPIRVCompositeTypeLayoutPassBase() : ::mlir::OperationPass<mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  SPIRVCompositeTypeLayoutPassBase(const SPIRVCompositeTypeLayoutPassBase &other) : ::mlir::OperationPass<mlir::ModuleOp>(other) {}

  /// Returns the command-line argument attached to this pass.
  static constexpr ::llvm::StringLiteral getArgumentName() {
    return ::llvm::StringLiteral("decorate-spirv-composite-type-layout");
  }
  ::llvm::StringRef getArgument() const override { return "decorate-spirv-composite-type-layout"; }

  ::llvm::StringRef getDescription() const override { return "Decorate SPIR-V composite type with layout info"; }

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

  /// 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 {
    
  }

  /// 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(SPIRVCompositeTypeLayoutPassBase<DerivedT>)

protected:
private:

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

std::unique_ptr<::mlir::Pass> createSPIRVCompositeTypeLayoutPass() {
  return impl::createSPIRVCompositeTypeLayoutPass();
}
#undef GEN_PASS_DEF_SPIRVCOMPOSITETYPELAYOUTPASS
#endif // GEN_PASS_DEF_SPIRVCOMPOSITETYPELAYOUTPASS

//===----------------------------------------------------------------------===//
// SPIRVLowerABIAttributesPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_SPIRVLOWERABIATTRIBUTESPASS
std::unique_ptr<::mlir::Pass> createSPIRVLowerABIAttributesPass();
#undef GEN_PASS_DECL_SPIRVLOWERABIATTRIBUTESPASS
#endif // GEN_PASS_DECL_SPIRVLOWERABIATTRIBUTESPASS
#ifdef GEN_PASS_DEF_SPIRVLOWERABIATTRIBUTESPASS

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

template <typename DerivedT>
class SPIRVLowerABIAttributesPassBase : public ::mlir::OperationPass<spirv::ModuleOp> {
public:
  using Base = SPIRVLowerABIAttributesPassBase;

  SPIRVLowerABIAttributesPassBase() : ::mlir::OperationPass<spirv::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  SPIRVLowerABIAttributesPassBase(const SPIRVLowerABIAttributesPassBase &other) : ::mlir::OperationPass<spirv::ModuleOp>(other) {}

  /// Returns the command-line argument attached to this pass.
  static constexpr ::llvm::StringLiteral getArgumentName() {
    return ::llvm::StringLiteral("spirv-lower-abi-attrs");
  }
  ::llvm::StringRef getArgument() const override { return "spirv-lower-abi-attrs"; }

  ::llvm::StringRef getDescription() const override { return "Decorate SPIR-V composite type with layout info"; }

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

  /// 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 {
    
  }

  /// 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(SPIRVLowerABIAttributesPassBase<DerivedT>)

protected:
private:

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

std::unique_ptr<::mlir::Pass> createSPIRVLowerABIAttributesPass() {
  return impl::createSPIRVLowerABIAttributesPass();
}
#undef GEN_PASS_DEF_SPIRVLOWERABIATTRIBUTESPASS
#endif // GEN_PASS_DEF_SPIRVLOWERABIATTRIBUTESPASS

//===----------------------------------------------------------------------===//
// SPIRVRewriteInsertsPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_SPIRVREWRITEINSERTSPASS
std::unique_ptr<::mlir::Pass> createSPIRVRewriteInsertsPass();
#undef GEN_PASS_DECL_SPIRVREWRITEINSERTSPASS
#endif // GEN_PASS_DECL_SPIRVREWRITEINSERTSPASS
#ifdef GEN_PASS_DEF_SPIRVREWRITEINSERTSPASS

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

template <typename DerivedT>
class SPIRVRewriteInsertsPassBase : public ::mlir::OperationPass<spirv::ModuleOp> {
public:
  using Base = SPIRVRewriteInsertsPassBase;

  SPIRVRewriteInsertsPassBase() : ::mlir::OperationPass<spirv::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  SPIRVRewriteInsertsPassBase(const SPIRVRewriteInsertsPassBase &other) : ::mlir::OperationPass<spirv::ModuleOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Rewrite sequential chains of `spirv.CompositeInsert` operations into `spirv.CompositeConstruct` operations"; }

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

  /// 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 {
    
  }

  /// 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(SPIRVRewriteInsertsPassBase<DerivedT>)

protected:
private:

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

std::unique_ptr<::mlir::Pass> createSPIRVRewriteInsertsPass() {
  return impl::createSPIRVRewriteInsertsPass();
}
#undef GEN_PASS_DEF_SPIRVREWRITEINSERTSPASS
#endif // GEN_PASS_DEF_SPIRVREWRITEINSERTSPASS

//===----------------------------------------------------------------------===//
// SPIRVUnifyAliasedResourcePass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_SPIRVUNIFYALIASEDRESOURCEPASS
#undef GEN_PASS_DECL_SPIRVUNIFYALIASEDRESOURCEPASS
#endif // GEN_PASS_DECL_SPIRVUNIFYALIASEDRESOURCEPASS
#ifdef GEN_PASS_DEF_SPIRVUNIFYALIASEDRESOURCEPASS
namespace impl {

template <typename DerivedT>
class SPIRVUnifyAliasedResourcePassBase : public ::mlir::OperationPass<spirv::ModuleOp> {
public:
  using Base = SPIRVUnifyAliasedResourcePassBase;

  SPIRVUnifyAliasedResourcePassBase() : ::mlir::OperationPass<spirv::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  SPIRVUnifyAliasedResourcePassBase(const SPIRVUnifyAliasedResourcePassBase &other) : ::mlir::OperationPass<spirv::ModuleOp>(other) {}

  /// Returns the command-line argument attached to this pass.
  static constexpr ::llvm::StringLiteral getArgumentName() {
    return ::llvm::StringLiteral("spirv-unify-aliased-resource");
  }
  ::llvm::StringRef getArgument() const override { return "spirv-unify-aliased-resource"; }

  ::llvm::StringRef getDescription() const override { return "Unify access of multiple aliased resources into access of one single resource"; }

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

  /// 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 {
    
  }

  /// 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(SPIRVUnifyAliasedResourcePassBase<DerivedT>)

protected:
private:
};
} // namespace impl
#undef GEN_PASS_DEF_SPIRVUNIFYALIASEDRESOURCEPASS
#endif // GEN_PASS_DEF_SPIRVUNIFYALIASEDRESOURCEPASS

//===----------------------------------------------------------------------===//
// SPIRVUpdateVCEPass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_SPIRVUPDATEVCEPASS
std::unique_ptr<::mlir::Pass> createSPIRVUpdateVCEPass();
#undef GEN_PASS_DECL_SPIRVUPDATEVCEPASS
#endif // GEN_PASS_DECL_SPIRVUPDATEVCEPASS
#ifdef GEN_PASS_DEF_SPIRVUPDATEVCEPASS

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

template <typename DerivedT>
class SPIRVUpdateVCEPassBase : public ::mlir::OperationPass<spirv::ModuleOp> {
public:
  using Base = SPIRVUpdateVCEPassBase;

  SPIRVUpdateVCEPassBase() : ::mlir::OperationPass<spirv::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  SPIRVUpdateVCEPassBase(const SPIRVUpdateVCEPassBase &other) : ::mlir::OperationPass<spirv::ModuleOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Deduce and attach minimal (version, capabilities, extensions) requirements to spirv.module ops"; }

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

  /// 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 {
    
  }

  /// 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(SPIRVUpdateVCEPassBase<DerivedT>)

protected:
private:

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

std::unique_ptr<::mlir::Pass> createSPIRVUpdateVCEPass() {
  return impl::createSPIRVUpdateVCEPass();
}
#undef GEN_PASS_DEF_SPIRVUPDATEVCEPASS
#endif // GEN_PASS_DEF_SPIRVUPDATEVCEPASS

//===----------------------------------------------------------------------===//
// SPIRVWebGPUPreparePass
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_SPIRVWEBGPUPREPAREPASS
std::unique_ptr<::mlir::Pass> createSPIRVWebGPUPreparePass();
#undef GEN_PASS_DECL_SPIRVWEBGPUPREPAREPASS
#endif // GEN_PASS_DECL_SPIRVWEBGPUPREPAREPASS
#ifdef GEN_PASS_DEF_SPIRVWEBGPUPREPAREPASS

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

template <typename DerivedT>
class SPIRVWebGPUPreparePassBase : public ::mlir::OperationPass<spirv::ModuleOp> {
public:
  using Base = SPIRVWebGPUPreparePassBase;

  SPIRVWebGPUPreparePassBase() : ::mlir::OperationPass<spirv::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  SPIRVWebGPUPreparePassBase(const SPIRVWebGPUPreparePassBase &other) : ::mlir::OperationPass<spirv::ModuleOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Prepare SPIR-V to target WebGPU by expanding unsupported ops and replacing with supported ones"; }

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

  /// 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 {
    
  }

  /// 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(SPIRVWebGPUPreparePassBase<DerivedT>)

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// SPIRVCanonicalizeGLPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// SPIRVCompositeTypeLayoutPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// SPIRVLowerABIAttributesPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// SPIRVRewriteInsertsPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// SPIRVUnifyAliasedResourcePass Registration
//===----------------------------------------------------------------------===//

inline void registerSPIRVUnifyAliasedResourcePass() {
  ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
    return mlir::spirv::createUnifyAliasedResourcePass();
  });
}

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

//===----------------------------------------------------------------------===//
// SPIRVUpdateVCEPass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// SPIRVWebGPUPreparePass Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// SPIRV Registration
//===----------------------------------------------------------------------===//

inline void registerSPIRVPasses() {
  registerSPIRVCanonicalizeGLPass();
  registerSPIRVCompositeTypeLayoutPass();
  registerSPIRVLowerABIAttributesPass();
  registerSPIRVRewriteInsertsPass();
  registerSPIRVUnifyAliasedResourcePass();
  registerSPIRVUpdateVCEPass();
  registerSPIRVWebGPUPreparePass();
}
#undef GEN_PASS_REGISTRATION
#endif // GEN_PASS_REGISTRATION
// Deprecated. Please use the new per-pass macros.
#ifdef GEN_PASS_CLASSES

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

  SPIRVCanonicalizeGLPassBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
  SPIRVCanonicalizeGLPassBase(const SPIRVCanonicalizeGLPassBase &other) : ::mlir::OperationPass<>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Canonicalize GLSL ops"; }

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

  /// 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 {
    
  }

  /// 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(SPIRVCanonicalizeGLPassBase<DerivedT>)

protected:
};

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

  SPIRVCompositeTypeLayoutPassBase() : ::mlir::OperationPass<mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  SPIRVCompositeTypeLayoutPassBase(const SPIRVCompositeTypeLayoutPassBase &other) : ::mlir::OperationPass<mlir::ModuleOp>(other) {}

  /// Returns the command-line argument attached to this pass.
  static constexpr ::llvm::StringLiteral getArgumentName() {
    return ::llvm::StringLiteral("decorate-spirv-composite-type-layout");
  }
  ::llvm::StringRef getArgument() const override { return "decorate-spirv-composite-type-layout"; }

  ::llvm::StringRef getDescription() const override { return "Decorate SPIR-V composite type with layout info"; }

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

  /// 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 {
    
  }

  /// 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(SPIRVCompositeTypeLayoutPassBase<DerivedT>)

protected:
};

template <typename DerivedT>
class SPIRVLowerABIAttributesPassBase : public ::mlir::OperationPass<spirv::ModuleOp> {
public:
  using Base = SPIRVLowerABIAttributesPassBase;

  SPIRVLowerABIAttributesPassBase() : ::mlir::OperationPass<spirv::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  SPIRVLowerABIAttributesPassBase(const SPIRVLowerABIAttributesPassBase &other) : ::mlir::OperationPass<spirv::ModuleOp>(other) {}

  /// Returns the command-line argument attached to this pass.
  static constexpr ::llvm::StringLiteral getArgumentName() {
    return ::llvm::StringLiteral("spirv-lower-abi-attrs");
  }
  ::llvm::StringRef getArgument() const override { return "spirv-lower-abi-attrs"; }

  ::llvm::StringRef getDescription() const override { return "Decorate SPIR-V composite type with layout info"; }

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

  /// 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 {
    
  }

  /// 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(SPIRVLowerABIAttributesPassBase<DerivedT>)

protected:
};

template <typename DerivedT>
class SPIRVRewriteInsertsPassBase : public ::mlir::OperationPass<spirv::ModuleOp> {
public:
  using Base = SPIRVRewriteInsertsPassBase;

  SPIRVRewriteInsertsPassBase() : ::mlir::OperationPass<spirv::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  SPIRVRewriteInsertsPassBase(const SPIRVRewriteInsertsPassBase &other) : ::mlir::OperationPass<spirv::ModuleOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Rewrite sequential chains of `spirv.CompositeInsert` operations into `spirv.CompositeConstruct` operations"; }

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

  /// 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 {
    
  }

  /// 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(SPIRVRewriteInsertsPassBase<DerivedT>)

protected:
};

template <typename DerivedT>
class SPIRVUnifyAliasedResourcePassBase : public ::mlir::OperationPass<spirv::ModuleOp> {
public:
  using Base = SPIRVUnifyAliasedResourcePassBase;

  SPIRVUnifyAliasedResourcePassBase() : ::mlir::OperationPass<spirv::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  SPIRVUnifyAliasedResourcePassBase(const SPIRVUnifyAliasedResourcePassBase &other) : ::mlir::OperationPass<spirv::ModuleOp>(other) {}

  /// Returns the command-line argument attached to this pass.
  static constexpr ::llvm::StringLiteral getArgumentName() {
    return ::llvm::StringLiteral("spirv-unify-aliased-resource");
  }
  ::llvm::StringRef getArgument() const override { return "spirv-unify-aliased-resource"; }

  ::llvm::StringRef getDescription() const override { return "Unify access of multiple aliased resources into access of one single resource"; }

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

  /// 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 {
    
  }

  /// 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(SPIRVUnifyAliasedResourcePassBase<DerivedT>)

protected:
};

template <typename DerivedT>
class SPIRVUpdateVCEPassBase : public ::mlir::OperationPass<spirv::ModuleOp> {
public:
  using Base = SPIRVUpdateVCEPassBase;

  SPIRVUpdateVCEPassBase() : ::mlir::OperationPass<spirv::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  SPIRVUpdateVCEPassBase(const SPIRVUpdateVCEPassBase &other) : ::mlir::OperationPass<spirv::ModuleOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Deduce and attach minimal (version, capabilities, extensions) requirements to spirv.module ops"; }

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

  /// 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 {
    
  }

  /// 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(SPIRVUpdateVCEPassBase<DerivedT>)

protected:
};

template <typename DerivedT>
class SPIRVWebGPUPreparePassBase : public ::mlir::OperationPass<spirv::ModuleOp> {
public:
  using Base = SPIRVWebGPUPreparePassBase;

  SPIRVWebGPUPreparePassBase() : ::mlir::OperationPass<spirv::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
  SPIRVWebGPUPreparePassBase(const SPIRVWebGPUPreparePassBase &other) : ::mlir::OperationPass<spirv::ModuleOp>(other) {}

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

  ::llvm::StringRef getDescription() const override { return "Prepare SPIR-V to target WebGPU by expanding unsupported ops and replacing with supported ones"; }

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

  /// 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 {
    
  }

  /// 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(SPIRVWebGPUPreparePassBase<DerivedT>)

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