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

#ifdef GEN_PASS_DECL
// Generate declarations for all passes.
#define GEN_PASS_DECL_XEGPUBLOCKING
#define GEN_PASS_DECL_XEGPUFOLDALIASOPS
#define GEN_PASS_DECL_XEGPUPROPAGATELAYOUT
#define GEN_PASS_DECL_XEGPUSUBGROUPDISTRIBUTE
#define GEN_PASS_DECL_XEGPUWGTOSGDISTRIBUTE
#undef GEN_PASS_DECL
#endif // GEN_PASS_DECL

//===----------------------------------------------------------------------===//
// XeGPUBlocking
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_XEGPUBLOCKING
std::unique_ptr<::mlir::Pass> createXeGPUBlocking();
#undef GEN_PASS_DECL_XEGPUBLOCKING
#endif // GEN_PASS_DECL_XEGPUBLOCKING
#ifdef GEN_PASS_DEF_XEGPUBLOCKING

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

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

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

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

  ::llvm::StringRef getDescription() const override { return "Block XeGPU ops into smaller size."; }

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

  /// 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<memref::MemRefDialect>();
    registry.insert<xegpu::XeGPUDialect>();
    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(XeGPUBlockingBase<DerivedT>)

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// XeGPUFoldAliasOps
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_XEGPUFOLDALIASOPS
std::unique_ptr<::mlir::Pass> createXeGPUFoldAliasOps();
#undef GEN_PASS_DECL_XEGPUFOLDALIASOPS
#endif // GEN_PASS_DECL_XEGPUFOLDALIASOPS
#ifdef GEN_PASS_DEF_XEGPUFOLDALIASOPS

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

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

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

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

  ::llvm::StringRef getDescription() const override { return "Fold alias ops into XeGPU ops"; }

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

  /// 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<memref::MemRefDialect>();
    registry.insert<xegpu::XeGPUDialect>();
  }

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// XeGPUPropagateLayout
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_XEGPUPROPAGATELAYOUT
struct XeGPUPropagateLayoutOptions {
  bool printOnly = false;
};
std::unique_ptr<::mlir::Pass> createXeGPUPropagateLayout();
std::unique_ptr<::mlir::Pass> createXeGPUPropagateLayout(XeGPUPropagateLayoutOptions options);
#undef GEN_PASS_DECL_XEGPUPROPAGATELAYOUT
#endif // GEN_PASS_DECL_XEGPUPROPAGATELAYOUT
#ifdef GEN_PASS_DEF_XEGPUPROPAGATELAYOUT

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

namespace impl {
  std::unique_ptr<::mlir::Pass> createXeGPUPropagateLayout(XeGPUPropagateLayoutOptions options);
} // namespace impl
namespace impl {

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

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

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

  ::llvm::StringRef getDescription() const override { return "Propagate and assign XeGPU layout information"; }

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

  /// 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<memref::MemRefDialect>();
    registry.insert<xegpu::XeGPUDialect>();
    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(XeGPUPropagateLayoutBase<DerivedT>)

  XeGPUPropagateLayoutBase(XeGPUPropagateLayoutOptions options) : XeGPUPropagateLayoutBase() {
    printOnly = std::move(options.printOnly);
  }
protected:
  ::mlir::Pass::Option<bool> printOnly{*this, "print-analysis-only", ::llvm::cl::desc("Print the result of layout propagation analysis and exit."), ::llvm::cl::init(false)};
private:

  friend std::unique_ptr<::mlir::Pass> createXeGPUPropagateLayout() {
    return std::make_unique<DerivedT>();
  }

  friend std::unique_ptr<::mlir::Pass> createXeGPUPropagateLayout(XeGPUPropagateLayoutOptions options) {
    return std::make_unique<DerivedT>(std::move(options));
  }
};
} // namespace impl

std::unique_ptr<::mlir::Pass> createXeGPUPropagateLayout() {
  return impl::createXeGPUPropagateLayout();
}

std::unique_ptr<::mlir::Pass> createXeGPUPropagateLayout(XeGPUPropagateLayoutOptions options) {
  return impl::createXeGPUPropagateLayout(std::move(options));
}
#undef GEN_PASS_DEF_XEGPUPROPAGATELAYOUT
#endif // GEN_PASS_DEF_XEGPUPROPAGATELAYOUT

//===----------------------------------------------------------------------===//
// XeGPUSubgroupDistribute
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_XEGPUSUBGROUPDISTRIBUTE
std::unique_ptr<::mlir::Pass> createXeGPUSubgroupDistribute();
#undef GEN_PASS_DECL_XEGPUSUBGROUPDISTRIBUTE
#endif // GEN_PASS_DECL_XEGPUSUBGROUPDISTRIBUTE
#ifdef GEN_PASS_DEF_XEGPUSUBGROUPDISTRIBUTE

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

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

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

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

  ::llvm::StringRef getDescription() const override { return "Distribute XeGPU ops to work items"; }

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

  /// 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<memref::MemRefDialect>();
    registry.insert<xegpu::XeGPUDialect>();
    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(XeGPUSubgroupDistributeBase<DerivedT>)

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// XeGPUWgToSgDistribute
//===----------------------------------------------------------------------===//
#ifdef GEN_PASS_DECL_XEGPUWGTOSGDISTRIBUTE
std::unique_ptr<::mlir::Pass> createXeGPUWgToSgDistribute();
#undef GEN_PASS_DECL_XEGPUWGTOSGDISTRIBUTE
#endif // GEN_PASS_DECL_XEGPUWGTOSGDISTRIBUTE
#ifdef GEN_PASS_DEF_XEGPUWGTOSGDISTRIBUTE

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

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

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

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

  ::llvm::StringRef getDescription() const override { return "Transform WorkGroup level XeGPU code to SubGroup level"; }

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

  /// 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<memref::MemRefDialect>();
    registry.insert<xegpu::XeGPUDialect>();
    registry.insert<vector::VectorDialect>();
    registry.insert<arith::ArithDialect>();
    registry.insert<gpu::GPUDialect>();
    registry.insert<index::IndexDialect>();
  }

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

protected:
private:

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

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

//===----------------------------------------------------------------------===//
// XeGPUBlocking Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// XeGPUFoldAliasOps Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// XeGPUPropagateLayout Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// XeGPUSubgroupDistribute Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// XeGPUWgToSgDistribute Registration
//===----------------------------------------------------------------------===//

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

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

//===----------------------------------------------------------------------===//
// XeGPU Registration
//===----------------------------------------------------------------------===//

inline void registerXeGPUPasses() {
  registerXeGPUBlocking();
  registerXeGPUFoldAliasOps();
  registerXeGPUPropagateLayout();
  registerXeGPUSubgroupDistribute();
  registerXeGPUWgToSgDistribute();
}
#undef GEN_PASS_REGISTRATION
#endif // GEN_PASS_REGISTRATION
// Deprecated. Please use the new per-pass macros.
#ifdef GEN_PASS_CLASSES

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

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

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

  ::llvm::StringRef getDescription() const override { return "Block XeGPU ops into smaller size."; }

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

  /// 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<memref::MemRefDialect>();
    registry.insert<xegpu::XeGPUDialect>();
    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(XeGPUBlockingBase<DerivedT>)

protected:
};

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

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

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

  ::llvm::StringRef getDescription() const override { return "Fold alias ops into XeGPU ops"; }

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

  /// 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<memref::MemRefDialect>();
    registry.insert<xegpu::XeGPUDialect>();
  }

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

protected:
};

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

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

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

  ::llvm::StringRef getDescription() const override { return "Propagate and assign XeGPU layout information"; }

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

  /// 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<memref::MemRefDialect>();
    registry.insert<xegpu::XeGPUDialect>();
    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(XeGPUPropagateLayoutBase<DerivedT>)

protected:
  ::mlir::Pass::Option<bool> printOnly{*this, "print-analysis-only", ::llvm::cl::desc("Print the result of layout propagation analysis and exit."), ::llvm::cl::init(false)};
};

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

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

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

  ::llvm::StringRef getDescription() const override { return "Distribute XeGPU ops to work items"; }

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

  /// 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<memref::MemRefDialect>();
    registry.insert<xegpu::XeGPUDialect>();
    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(XeGPUSubgroupDistributeBase<DerivedT>)

protected:
};

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

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

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

  ::llvm::StringRef getDescription() const override { return "Transform WorkGroup level XeGPU code to SubGroup level"; }

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

  /// 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<memref::MemRefDialect>();
    registry.insert<xegpu::XeGPUDialect>();
    registry.insert<vector::VectorDialect>();
    registry.insert<arith::ArithDialect>();
    registry.insert<gpu::GPUDialect>();
    registry.insert<index::IndexDialect>();
  }

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

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