#ifdef GEN_PASS_DECL
#define GEN_PASS_DECL_XEGPUFOLDALIASOPS
#undef GEN_PASS_DECL
#endif
#ifdef GEN_PASS_DECL_XEGPUFOLDALIASOPS
std::unique_ptr<::mlir::Pass> createXeGPUFoldAliasOps();
#undef GEN_PASS_DECL_XEGPUFOLDALIASOPS
#endif
#ifdef GEN_PASS_DEF_XEGPUFOLDALIASOPS
namespace impl {
std::unique_ptr<::mlir::Pass> createXeGPUFoldAliasOps();
}
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;
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"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("XeGPUFoldAliasOps");
}
::llvm::StringRef getName() const override { return "XeGPUFoldAliasOps"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<memref::MemRefDialect>();
registry.insert<xegpu::XeGPUDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(XeGPUFoldAliasOpsBase<DerivedT>)
protected:
private:
friend std::unique_ptr<::mlir::Pass> createXeGPUFoldAliasOps() {
return std::make_unique<DerivedT>();
}
};
}
std::unique_ptr<::mlir::Pass> createXeGPUFoldAliasOps() {
return impl::createXeGPUFoldAliasOps();
}
#undef GEN_PASS_DEF_XEGPUFOLDALIASOPS
#endif
#ifdef GEN_PASS_REGISTRATION
inline void registerXeGPUFoldAliasOps() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createXeGPUFoldAliasOps();
});
}
inline void registerXeGPUFoldAliasOpsPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createXeGPUFoldAliasOps();
});
}
inline void registerXeGPUPasses() {
registerXeGPUFoldAliasOps();
}
#undef GEN_PASS_REGISTRATION
#endif
#ifdef GEN_PASS_CLASSES
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;
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"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("XeGPUFoldAliasOps");
}
::llvm::StringRef getName() const override { return "XeGPUFoldAliasOps"; }
static bool classof(const ::mlir::Pass *pass) {
return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
}
std::unique_ptr<::mlir::Pass> clonePass() const override {
return std::make_unique<DerivedT>(*static_cast<const DerivedT *>(this));
}
void getDependentDialects(::mlir::DialectRegistry ®istry) const override {
registry.insert<memref::MemRefDialect>();
registry.insert<xegpu::XeGPUDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(XeGPUFoldAliasOpsBase<DerivedT>)
protected:
};
#undef GEN_PASS_CLASSES
#endif