#ifdef GEN_PASS_DECL
#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
#ifdef GEN_PASS_DECL_SPIRVCANONICALIZEGLPASS
std::unique_ptr<::mlir::Pass> createSPIRVCanonicalizeGLPass();
#undef GEN_PASS_DECL_SPIRVCANONICALIZEGLPASS
#endif
#ifdef GEN_PASS_DEF_SPIRVCANONICALIZEGLPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createSPIRVCanonicalizeGLPass();
}
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) {}
SPIRVCanonicalizeGLPassBase& operator=(const SPIRVCanonicalizeGLPassBase &) = delete;
SPIRVCanonicalizeGLPassBase(SPIRVCanonicalizeGLPassBase &&) = delete;
SPIRVCanonicalizeGLPassBase& operator=(SPIRVCanonicalizeGLPassBase &&) = delete;
~SPIRVCanonicalizeGLPassBase() = default;
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"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("SPIRVCanonicalizeGLPass");
}
::llvm::StringRef getName() const override { return "SPIRVCanonicalizeGLPass"; }
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 {
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SPIRVCanonicalizeGLPassBase<DerivedT>)
protected:
private:
friend std::unique_ptr<::mlir::Pass> createSPIRVCanonicalizeGLPass() {
return std::make_unique<DerivedT>();
}
};
}
std::unique_ptr<::mlir::Pass> createSPIRVCanonicalizeGLPass() {
return impl::createSPIRVCanonicalizeGLPass();
}
#undef GEN_PASS_DEF_SPIRVCANONICALIZEGLPASS
#endif
#ifdef GEN_PASS_DECL_SPIRVCOMPOSITETYPELAYOUTPASS
std::unique_ptr<::mlir::Pass> createSPIRVCompositeTypeLayoutPass();
#undef GEN_PASS_DECL_SPIRVCOMPOSITETYPELAYOUTPASS
#endif
#ifdef GEN_PASS_DEF_SPIRVCOMPOSITETYPELAYOUTPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createSPIRVCompositeTypeLayoutPass();
}
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) {}
SPIRVCompositeTypeLayoutPassBase& operator=(const SPIRVCompositeTypeLayoutPassBase &) = delete;
SPIRVCompositeTypeLayoutPassBase(SPIRVCompositeTypeLayoutPassBase &&) = delete;
SPIRVCompositeTypeLayoutPassBase& operator=(SPIRVCompositeTypeLayoutPassBase &&) = delete;
~SPIRVCompositeTypeLayoutPassBase() = default;
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"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("SPIRVCompositeTypeLayoutPass");
}
::llvm::StringRef getName() const override { return "SPIRVCompositeTypeLayoutPass"; }
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 {
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SPIRVCompositeTypeLayoutPassBase<DerivedT>)
protected:
private:
friend std::unique_ptr<::mlir::Pass> createSPIRVCompositeTypeLayoutPass() {
return std::make_unique<DerivedT>();
}
};
}
std::unique_ptr<::mlir::Pass> createSPIRVCompositeTypeLayoutPass() {
return impl::createSPIRVCompositeTypeLayoutPass();
}
#undef GEN_PASS_DEF_SPIRVCOMPOSITETYPELAYOUTPASS
#endif
#ifdef GEN_PASS_DECL_SPIRVLOWERABIATTRIBUTESPASS
std::unique_ptr<::mlir::Pass> createSPIRVLowerABIAttributesPass();
#undef GEN_PASS_DECL_SPIRVLOWERABIATTRIBUTESPASS
#endif
#ifdef GEN_PASS_DEF_SPIRVLOWERABIATTRIBUTESPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createSPIRVLowerABIAttributesPass();
}
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) {}
SPIRVLowerABIAttributesPassBase& operator=(const SPIRVLowerABIAttributesPassBase &) = delete;
SPIRVLowerABIAttributesPassBase(SPIRVLowerABIAttributesPassBase &&) = delete;
SPIRVLowerABIAttributesPassBase& operator=(SPIRVLowerABIAttributesPassBase &&) = delete;
~SPIRVLowerABIAttributesPassBase() = default;
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"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("SPIRVLowerABIAttributesPass");
}
::llvm::StringRef getName() const override { return "SPIRVLowerABIAttributesPass"; }
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 {
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SPIRVLowerABIAttributesPassBase<DerivedT>)
protected:
private:
friend std::unique_ptr<::mlir::Pass> createSPIRVLowerABIAttributesPass() {
return std::make_unique<DerivedT>();
}
};
}
std::unique_ptr<::mlir::Pass> createSPIRVLowerABIAttributesPass() {
return impl::createSPIRVLowerABIAttributesPass();
}
#undef GEN_PASS_DEF_SPIRVLOWERABIATTRIBUTESPASS
#endif
#ifdef GEN_PASS_DECL_SPIRVREWRITEINSERTSPASS
std::unique_ptr<::mlir::Pass> createSPIRVRewriteInsertsPass();
#undef GEN_PASS_DECL_SPIRVREWRITEINSERTSPASS
#endif
#ifdef GEN_PASS_DEF_SPIRVREWRITEINSERTSPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createSPIRVRewriteInsertsPass();
}
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) {}
SPIRVRewriteInsertsPassBase& operator=(const SPIRVRewriteInsertsPassBase &) = delete;
SPIRVRewriteInsertsPassBase(SPIRVRewriteInsertsPassBase &&) = delete;
SPIRVRewriteInsertsPassBase& operator=(SPIRVRewriteInsertsPassBase &&) = delete;
~SPIRVRewriteInsertsPassBase() = default;
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"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("SPIRVRewriteInsertsPass");
}
::llvm::StringRef getName() const override { return "SPIRVRewriteInsertsPass"; }
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 {
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SPIRVRewriteInsertsPassBase<DerivedT>)
protected:
private:
friend std::unique_ptr<::mlir::Pass> createSPIRVRewriteInsertsPass() {
return std::make_unique<DerivedT>();
}
};
}
std::unique_ptr<::mlir::Pass> createSPIRVRewriteInsertsPass() {
return impl::createSPIRVRewriteInsertsPass();
}
#undef GEN_PASS_DEF_SPIRVREWRITEINSERTSPASS
#endif
#ifdef GEN_PASS_DECL_SPIRVUNIFYALIASEDRESOURCEPASS
#undef GEN_PASS_DECL_SPIRVUNIFYALIASEDRESOURCEPASS
#endif
#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) {}
SPIRVUnifyAliasedResourcePassBase& operator=(const SPIRVUnifyAliasedResourcePassBase &) = delete;
SPIRVUnifyAliasedResourcePassBase(SPIRVUnifyAliasedResourcePassBase &&) = delete;
SPIRVUnifyAliasedResourcePassBase& operator=(SPIRVUnifyAliasedResourcePassBase &&) = delete;
~SPIRVUnifyAliasedResourcePassBase() = default;
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"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("SPIRVUnifyAliasedResourcePass");
}
::llvm::StringRef getName() const override { return "SPIRVUnifyAliasedResourcePass"; }
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 {
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SPIRVUnifyAliasedResourcePassBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_SPIRVUNIFYALIASEDRESOURCEPASS
#endif
#ifdef GEN_PASS_DECL_SPIRVUPDATEVCEPASS
std::unique_ptr<::mlir::Pass> createSPIRVUpdateVCEPass();
#undef GEN_PASS_DECL_SPIRVUPDATEVCEPASS
#endif
#ifdef GEN_PASS_DEF_SPIRVUPDATEVCEPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createSPIRVUpdateVCEPass();
}
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) {}
SPIRVUpdateVCEPassBase& operator=(const SPIRVUpdateVCEPassBase &) = delete;
SPIRVUpdateVCEPassBase(SPIRVUpdateVCEPassBase &&) = delete;
SPIRVUpdateVCEPassBase& operator=(SPIRVUpdateVCEPassBase &&) = delete;
~SPIRVUpdateVCEPassBase() = default;
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"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("SPIRVUpdateVCEPass");
}
::llvm::StringRef getName() const override { return "SPIRVUpdateVCEPass"; }
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 {
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SPIRVUpdateVCEPassBase<DerivedT>)
protected:
private:
friend std::unique_ptr<::mlir::Pass> createSPIRVUpdateVCEPass() {
return std::make_unique<DerivedT>();
}
};
}
std::unique_ptr<::mlir::Pass> createSPIRVUpdateVCEPass() {
return impl::createSPIRVUpdateVCEPass();
}
#undef GEN_PASS_DEF_SPIRVUPDATEVCEPASS
#endif
#ifdef GEN_PASS_DECL_SPIRVWEBGPUPREPAREPASS
std::unique_ptr<::mlir::Pass> createSPIRVWebGPUPreparePass();
#undef GEN_PASS_DECL_SPIRVWEBGPUPREPAREPASS
#endif
#ifdef GEN_PASS_DEF_SPIRVWEBGPUPREPAREPASS
namespace impl {
std::unique_ptr<::mlir::Pass> createSPIRVWebGPUPreparePass();
}
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) {}
SPIRVWebGPUPreparePassBase& operator=(const SPIRVWebGPUPreparePassBase &) = delete;
SPIRVWebGPUPreparePassBase(SPIRVWebGPUPreparePassBase &&) = delete;
SPIRVWebGPUPreparePassBase& operator=(SPIRVWebGPUPreparePassBase &&) = delete;
~SPIRVWebGPUPreparePassBase() = default;
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"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("SPIRVWebGPUPreparePass");
}
::llvm::StringRef getName() const override { return "SPIRVWebGPUPreparePass"; }
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 {
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SPIRVWebGPUPreparePassBase<DerivedT>)
protected:
private:
friend std::unique_ptr<::mlir::Pass> createSPIRVWebGPUPreparePass() {
return std::make_unique<DerivedT>();
}
};
}
std::unique_ptr<::mlir::Pass> createSPIRVWebGPUPreparePass() {
return impl::createSPIRVWebGPUPreparePass();
}
#undef GEN_PASS_DEF_SPIRVWEBGPUPREPAREPASS
#endif
#ifdef GEN_PASS_REGISTRATION
inline void registerSPIRVCanonicalizeGLPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createSPIRVCanonicalizeGLPass();
});
}
inline void registerSPIRVCanonicalizeGLPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createSPIRVCanonicalizeGLPass();
});
}
inline void registerSPIRVCompositeTypeLayoutPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createSPIRVCompositeTypeLayoutPass();
});
}
inline void registerSPIRVCompositeTypeLayoutPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createSPIRVCompositeTypeLayoutPass();
});
}
inline void registerSPIRVLowerABIAttributesPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createSPIRVLowerABIAttributesPass();
});
}
inline void registerSPIRVLowerABIAttributesPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createSPIRVLowerABIAttributesPass();
});
}
inline void registerSPIRVRewriteInsertsPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createSPIRVRewriteInsertsPass();
});
}
inline void registerSPIRVRewriteInsertsPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createSPIRVRewriteInsertsPass();
});
}
inline void registerSPIRVUnifyAliasedResourcePass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::spirv::createUnifyAliasedResourcePass();
});
}
inline void registerSPIRVUnifyAliasedResourcePassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::spirv::createUnifyAliasedResourcePass();
});
}
inline void registerSPIRVUpdateVCEPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createSPIRVUpdateVCEPass();
});
}
inline void registerSPIRVUpdateVCEPassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createSPIRVUpdateVCEPass();
});
}
inline void registerSPIRVWebGPUPreparePass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createSPIRVWebGPUPreparePass();
});
}
inline void registerSPIRVWebGPUPreparePassPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return createSPIRVWebGPUPreparePass();
});
}
inline void registerSPIRVPasses() {
registerSPIRVCanonicalizeGLPass();
registerSPIRVCompositeTypeLayoutPass();
registerSPIRVLowerABIAttributesPass();
registerSPIRVRewriteInsertsPass();
registerSPIRVUnifyAliasedResourcePass();
registerSPIRVUpdateVCEPass();
registerSPIRVWebGPUPreparePass();
}
#undef GEN_PASS_REGISTRATION
#endif
#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) {}
SPIRVCanonicalizeGLPassBase& operator=(const SPIRVCanonicalizeGLPassBase &) = delete;
SPIRVCanonicalizeGLPassBase(SPIRVCanonicalizeGLPassBase &&) = delete;
SPIRVCanonicalizeGLPassBase& operator=(SPIRVCanonicalizeGLPassBase &&) = delete;
~SPIRVCanonicalizeGLPassBase() = default;
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"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("SPIRVCanonicalizeGLPass");
}
::llvm::StringRef getName() const override { return "SPIRVCanonicalizeGLPass"; }
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 {
}
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) {}
SPIRVCompositeTypeLayoutPassBase& operator=(const SPIRVCompositeTypeLayoutPassBase &) = delete;
SPIRVCompositeTypeLayoutPassBase(SPIRVCompositeTypeLayoutPassBase &&) = delete;
SPIRVCompositeTypeLayoutPassBase& operator=(SPIRVCompositeTypeLayoutPassBase &&) = delete;
~SPIRVCompositeTypeLayoutPassBase() = default;
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"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("SPIRVCompositeTypeLayoutPass");
}
::llvm::StringRef getName() const override { return "SPIRVCompositeTypeLayoutPass"; }
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 {
}
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) {}
SPIRVLowerABIAttributesPassBase& operator=(const SPIRVLowerABIAttributesPassBase &) = delete;
SPIRVLowerABIAttributesPassBase(SPIRVLowerABIAttributesPassBase &&) = delete;
SPIRVLowerABIAttributesPassBase& operator=(SPIRVLowerABIAttributesPassBase &&) = delete;
~SPIRVLowerABIAttributesPassBase() = default;
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"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("SPIRVLowerABIAttributesPass");
}
::llvm::StringRef getName() const override { return "SPIRVLowerABIAttributesPass"; }
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 {
}
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) {}
SPIRVRewriteInsertsPassBase& operator=(const SPIRVRewriteInsertsPassBase &) = delete;
SPIRVRewriteInsertsPassBase(SPIRVRewriteInsertsPassBase &&) = delete;
SPIRVRewriteInsertsPassBase& operator=(SPIRVRewriteInsertsPassBase &&) = delete;
~SPIRVRewriteInsertsPassBase() = default;
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"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("SPIRVRewriteInsertsPass");
}
::llvm::StringRef getName() const override { return "SPIRVRewriteInsertsPass"; }
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 {
}
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) {}
SPIRVUnifyAliasedResourcePassBase& operator=(const SPIRVUnifyAliasedResourcePassBase &) = delete;
SPIRVUnifyAliasedResourcePassBase(SPIRVUnifyAliasedResourcePassBase &&) = delete;
SPIRVUnifyAliasedResourcePassBase& operator=(SPIRVUnifyAliasedResourcePassBase &&) = delete;
~SPIRVUnifyAliasedResourcePassBase() = default;
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"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("SPIRVUnifyAliasedResourcePass");
}
::llvm::StringRef getName() const override { return "SPIRVUnifyAliasedResourcePass"; }
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 {
}
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) {}
SPIRVUpdateVCEPassBase& operator=(const SPIRVUpdateVCEPassBase &) = delete;
SPIRVUpdateVCEPassBase(SPIRVUpdateVCEPassBase &&) = delete;
SPIRVUpdateVCEPassBase& operator=(SPIRVUpdateVCEPassBase &&) = delete;
~SPIRVUpdateVCEPassBase() = default;
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"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("SPIRVUpdateVCEPass");
}
::llvm::StringRef getName() const override { return "SPIRVUpdateVCEPass"; }
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 {
}
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) {}
SPIRVWebGPUPreparePassBase& operator=(const SPIRVWebGPUPreparePassBase &) = delete;
SPIRVWebGPUPreparePassBase(SPIRVWebGPUPreparePassBase &&) = delete;
SPIRVWebGPUPreparePassBase& operator=(SPIRVWebGPUPreparePassBase &&) = delete;
~SPIRVWebGPUPreparePassBase() = default;
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"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("SPIRVWebGPUPreparePass");
}
::llvm::StringRef getName() const override { return "SPIRVWebGPUPreparePass"; }
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 {
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(SPIRVWebGPUPreparePassBase<DerivedT>)
protected:
};
#undef GEN_PASS_CLASSES
#endif