#ifdef GEN_PASS_DECL
#define GEN_PASS_DECL_ASYNCFUNCTOASYNCRUNTIME
#define GEN_PASS_DECL_ASYNCPARALLELFOR
#define GEN_PASS_DECL_ASYNCRUNTIMEPOLICYBASEDREFCOUNTING
#define GEN_PASS_DECL_ASYNCRUNTIMEREFCOUNTING
#define GEN_PASS_DECL_ASYNCRUNTIMEREFCOUNTINGOPT
#define GEN_PASS_DECL_ASYNCTOASYNCRUNTIME
#undef GEN_PASS_DECL
#endif
#ifdef GEN_PASS_DECL_ASYNCFUNCTOASYNCRUNTIME
#undef GEN_PASS_DECL_ASYNCFUNCTOASYNCRUNTIME
#endif
#ifdef GEN_PASS_DEF_ASYNCFUNCTOASYNCRUNTIME
namespace impl {
template <typename DerivedT>
class AsyncFuncToAsyncRuntimeBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = AsyncFuncToAsyncRuntimeBase;
AsyncFuncToAsyncRuntimeBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
AsyncFuncToAsyncRuntimeBase(const AsyncFuncToAsyncRuntimeBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
AsyncFuncToAsyncRuntimeBase& operator=(const AsyncFuncToAsyncRuntimeBase &) = delete;
AsyncFuncToAsyncRuntimeBase(AsyncFuncToAsyncRuntimeBase &&) = delete;
AsyncFuncToAsyncRuntimeBase& operator=(AsyncFuncToAsyncRuntimeBase &&) = delete;
~AsyncFuncToAsyncRuntimeBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("async-func-to-async-runtime");
}
::llvm::StringRef getArgument() const override { return "async-func-to-async-runtime"; }
::llvm::StringRef getDescription() const override { return "Lower async.func operations to the explicit async.runtime andasync.coro operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("AsyncFuncToAsyncRuntime");
}
::llvm::StringRef getName() const override { return "AsyncFuncToAsyncRuntime"; }
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<async::AsyncDialect>();
registry.insert<func::FuncDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(AsyncFuncToAsyncRuntimeBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_ASYNCFUNCTOASYNCRUNTIME
#endif
#ifdef GEN_PASS_DECL_ASYNCPARALLELFOR
struct AsyncParallelForOptions { … };
#undef GEN_PASS_DECL_ASYNCPARALLELFOR
#endif
#ifdef GEN_PASS_DEF_ASYNCPARALLELFOR
namespace impl {
template <typename DerivedT>
class AsyncParallelForBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = AsyncParallelForBase;
AsyncParallelForBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
AsyncParallelForBase(const AsyncParallelForBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
AsyncParallelForBase& operator=(const AsyncParallelForBase &) = delete;
AsyncParallelForBase(AsyncParallelForBase &&) = delete;
AsyncParallelForBase& operator=(AsyncParallelForBase &&) = delete;
~AsyncParallelForBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("async-parallel-for");
}
::llvm::StringRef getArgument() const override { return "async-parallel-for"; }
::llvm::StringRef getDescription() const override { return "Convert scf.parallel operations to multiple async compute ops executed concurrently for non-overlapping iteration ranges"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("AsyncParallelFor");
}
::llvm::StringRef getName() const override { return "AsyncParallelFor"; }
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<arith::ArithDialect>();
registry.insert<async::AsyncDialect>();
registry.insert<func::FuncDialect>();
registry.insert<scf::SCFDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(AsyncParallelForBase<DerivedT>)
AsyncParallelForBase(AsyncParallelForOptions options) : AsyncParallelForBase() {
asyncDispatch = std::move(options.asyncDispatch);
numWorkerThreads = std::move(options.numWorkerThreads);
minTaskSize = std::move(options.minTaskSize);
}
protected:
::mlir::Pass::Option<bool> asyncDispatch{*this, "async-dispatch", ::llvm::cl::desc("Dispatch async compute tasks using recursive work splitting. If `false` async compute tasks will be launched using simple for loop in the caller thread."), ::llvm::cl::init(true)};
::mlir::Pass::Option<int32_t> numWorkerThreads{*this, "num-workers", ::llvm::cl::desc("The number of available workers to execute async operations. If `-1` the value will be retrieved from the runtime."), ::llvm::cl::init(8)};
::mlir::Pass::Option<int32_t> minTaskSize{*this, "min-task-size", ::llvm::cl::desc("The minimum task size for sharding parallel operation."), ::llvm::cl::init(1000)};
private:
};
}
#undef GEN_PASS_DEF_ASYNCPARALLELFOR
#endif
#ifdef GEN_PASS_DECL_ASYNCRUNTIMEPOLICYBASEDREFCOUNTING
#undef GEN_PASS_DECL_ASYNCRUNTIMEPOLICYBASEDREFCOUNTING
#endif
#ifdef GEN_PASS_DEF_ASYNCRUNTIMEPOLICYBASEDREFCOUNTING
namespace impl {
template <typename DerivedT>
class AsyncRuntimePolicyBasedRefCountingBase : public ::mlir::OperationPass<> {
public:
using Base = AsyncRuntimePolicyBasedRefCountingBase;
AsyncRuntimePolicyBasedRefCountingBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
AsyncRuntimePolicyBasedRefCountingBase(const AsyncRuntimePolicyBasedRefCountingBase &other) : ::mlir::OperationPass<>(other) {}
AsyncRuntimePolicyBasedRefCountingBase& operator=(const AsyncRuntimePolicyBasedRefCountingBase &) = delete;
AsyncRuntimePolicyBasedRefCountingBase(AsyncRuntimePolicyBasedRefCountingBase &&) = delete;
AsyncRuntimePolicyBasedRefCountingBase& operator=(AsyncRuntimePolicyBasedRefCountingBase &&) = delete;
~AsyncRuntimePolicyBasedRefCountingBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("async-runtime-policy-based-ref-counting");
}
::llvm::StringRef getArgument() const override { return "async-runtime-policy-based-ref-counting"; }
::llvm::StringRef getDescription() const override { return "Policy based reference counting for Async runtime operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("AsyncRuntimePolicyBasedRefCounting");
}
::llvm::StringRef getName() const override { return "AsyncRuntimePolicyBasedRefCounting"; }
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<async::AsyncDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(AsyncRuntimePolicyBasedRefCountingBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_ASYNCRUNTIMEPOLICYBASEDREFCOUNTING
#endif
#ifdef GEN_PASS_DECL_ASYNCRUNTIMEREFCOUNTING
#undef GEN_PASS_DECL_ASYNCRUNTIMEREFCOUNTING
#endif
#ifdef GEN_PASS_DEF_ASYNCRUNTIMEREFCOUNTING
namespace impl {
template <typename DerivedT>
class AsyncRuntimeRefCountingBase : public ::mlir::OperationPass<> {
public:
using Base = AsyncRuntimeRefCountingBase;
AsyncRuntimeRefCountingBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
AsyncRuntimeRefCountingBase(const AsyncRuntimeRefCountingBase &other) : ::mlir::OperationPass<>(other) {}
AsyncRuntimeRefCountingBase& operator=(const AsyncRuntimeRefCountingBase &) = delete;
AsyncRuntimeRefCountingBase(AsyncRuntimeRefCountingBase &&) = delete;
AsyncRuntimeRefCountingBase& operator=(AsyncRuntimeRefCountingBase &&) = delete;
~AsyncRuntimeRefCountingBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("async-runtime-ref-counting");
}
::llvm::StringRef getArgument() const override { return "async-runtime-ref-counting"; }
::llvm::StringRef getDescription() const override { return "Automatic reference counting for Async runtime operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("AsyncRuntimeRefCounting");
}
::llvm::StringRef getName() const override { return "AsyncRuntimeRefCounting"; }
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<async::AsyncDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(AsyncRuntimeRefCountingBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_ASYNCRUNTIMEREFCOUNTING
#endif
#ifdef GEN_PASS_DECL_ASYNCRUNTIMEREFCOUNTINGOPT
#undef GEN_PASS_DECL_ASYNCRUNTIMEREFCOUNTINGOPT
#endif
#ifdef GEN_PASS_DEF_ASYNCRUNTIMEREFCOUNTINGOPT
namespace impl {
template <typename DerivedT>
class AsyncRuntimeRefCountingOptBase : public ::mlir::OperationPass<> {
public:
using Base = AsyncRuntimeRefCountingOptBase;
AsyncRuntimeRefCountingOptBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
AsyncRuntimeRefCountingOptBase(const AsyncRuntimeRefCountingOptBase &other) : ::mlir::OperationPass<>(other) {}
AsyncRuntimeRefCountingOptBase& operator=(const AsyncRuntimeRefCountingOptBase &) = delete;
AsyncRuntimeRefCountingOptBase(AsyncRuntimeRefCountingOptBase &&) = delete;
AsyncRuntimeRefCountingOptBase& operator=(AsyncRuntimeRefCountingOptBase &&) = delete;
~AsyncRuntimeRefCountingOptBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("async-runtime-ref-counting-opt");
}
::llvm::StringRef getArgument() const override { return "async-runtime-ref-counting-opt"; }
::llvm::StringRef getDescription() const override { return "Optimize automatic reference counting operations for theAsync runtime by removing redundant operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("AsyncRuntimeRefCountingOpt");
}
::llvm::StringRef getName() const override { return "AsyncRuntimeRefCountingOpt"; }
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<async::AsyncDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(AsyncRuntimeRefCountingOptBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_ASYNCRUNTIMEREFCOUNTINGOPT
#endif
#ifdef GEN_PASS_DECL_ASYNCTOASYNCRUNTIME
#undef GEN_PASS_DECL_ASYNCTOASYNCRUNTIME
#endif
#ifdef GEN_PASS_DEF_ASYNCTOASYNCRUNTIME
namespace impl {
template <typename DerivedT>
class AsyncToAsyncRuntimeBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = AsyncToAsyncRuntimeBase;
AsyncToAsyncRuntimeBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
AsyncToAsyncRuntimeBase(const AsyncToAsyncRuntimeBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
AsyncToAsyncRuntimeBase& operator=(const AsyncToAsyncRuntimeBase &) = delete;
AsyncToAsyncRuntimeBase(AsyncToAsyncRuntimeBase &&) = delete;
AsyncToAsyncRuntimeBase& operator=(AsyncToAsyncRuntimeBase &&) = delete;
~AsyncToAsyncRuntimeBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("async-to-async-runtime");
}
::llvm::StringRef getArgument() const override { return "async-to-async-runtime"; }
::llvm::StringRef getDescription() const override { return "Lower all high level async operations (e.g. async.execute) tothe explicit async.runtime and async.coro operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("AsyncToAsyncRuntime");
}
::llvm::StringRef getName() const override { return "AsyncToAsyncRuntime"; }
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<async::AsyncDialect>();
registry.insert<func::FuncDialect>();
registry.insert<cf::ControlFlowDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(AsyncToAsyncRuntimeBase<DerivedT>)
protected:
private:
};
}
#undef GEN_PASS_DEF_ASYNCTOASYNCRUNTIME
#endif
#ifdef GEN_PASS_REGISTRATION
inline void registerAsyncFuncToAsyncRuntime() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createAsyncFuncToAsyncRuntimePass();
});
}
inline void registerAsyncFuncToAsyncRuntimePass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createAsyncFuncToAsyncRuntimePass();
});
}
inline void registerAsyncParallelFor() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createAsyncParallelForPass();
});
}
inline void registerAsyncParallelForPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createAsyncParallelForPass();
});
}
inline void registerAsyncRuntimePolicyBasedRefCounting() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createAsyncRuntimePolicyBasedRefCountingPass();
});
}
inline void registerAsyncRuntimePolicyBasedRefCountingPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createAsyncRuntimePolicyBasedRefCountingPass();
});
}
inline void registerAsyncRuntimeRefCounting() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createAsyncRuntimeRefCountingPass();
});
}
inline void registerAsyncRuntimeRefCountingPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createAsyncRuntimeRefCountingPass();
});
}
inline void registerAsyncRuntimeRefCountingOpt() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createAsyncRuntimeRefCountingOptPass();
});
}
inline void registerAsyncRuntimeRefCountingOptPass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createAsyncRuntimeRefCountingOptPass();
});
}
inline void registerAsyncToAsyncRuntime() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createAsyncToAsyncRuntimePass();
});
}
inline void registerAsyncToAsyncRuntimePass() {
::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
return mlir::createAsyncToAsyncRuntimePass();
});
}
inline void registerAsyncPasses() {
registerAsyncFuncToAsyncRuntime();
registerAsyncParallelFor();
registerAsyncRuntimePolicyBasedRefCounting();
registerAsyncRuntimeRefCounting();
registerAsyncRuntimeRefCountingOpt();
registerAsyncToAsyncRuntime();
}
#undef GEN_PASS_REGISTRATION
#endif
#ifdef GEN_PASS_CLASSES
template <typename DerivedT>
class AsyncFuncToAsyncRuntimeBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = AsyncFuncToAsyncRuntimeBase;
AsyncFuncToAsyncRuntimeBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
AsyncFuncToAsyncRuntimeBase(const AsyncFuncToAsyncRuntimeBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
AsyncFuncToAsyncRuntimeBase& operator=(const AsyncFuncToAsyncRuntimeBase &) = delete;
AsyncFuncToAsyncRuntimeBase(AsyncFuncToAsyncRuntimeBase &&) = delete;
AsyncFuncToAsyncRuntimeBase& operator=(AsyncFuncToAsyncRuntimeBase &&) = delete;
~AsyncFuncToAsyncRuntimeBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("async-func-to-async-runtime");
}
::llvm::StringRef getArgument() const override { return "async-func-to-async-runtime"; }
::llvm::StringRef getDescription() const override { return "Lower async.func operations to the explicit async.runtime andasync.coro operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("AsyncFuncToAsyncRuntime");
}
::llvm::StringRef getName() const override { return "AsyncFuncToAsyncRuntime"; }
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<async::AsyncDialect>();
registry.insert<func::FuncDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(AsyncFuncToAsyncRuntimeBase<DerivedT>)
protected:
};
template <typename DerivedT>
class AsyncParallelForBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = AsyncParallelForBase;
AsyncParallelForBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
AsyncParallelForBase(const AsyncParallelForBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
AsyncParallelForBase& operator=(const AsyncParallelForBase &) = delete;
AsyncParallelForBase(AsyncParallelForBase &&) = delete;
AsyncParallelForBase& operator=(AsyncParallelForBase &&) = delete;
~AsyncParallelForBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("async-parallel-for");
}
::llvm::StringRef getArgument() const override { return "async-parallel-for"; }
::llvm::StringRef getDescription() const override { return "Convert scf.parallel operations to multiple async compute ops executed concurrently for non-overlapping iteration ranges"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("AsyncParallelFor");
}
::llvm::StringRef getName() const override { return "AsyncParallelFor"; }
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<arith::ArithDialect>();
registry.insert<async::AsyncDialect>();
registry.insert<func::FuncDialect>();
registry.insert<scf::SCFDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(AsyncParallelForBase<DerivedT>)
protected:
::mlir::Pass::Option<bool> asyncDispatch{*this, "async-dispatch", ::llvm::cl::desc("Dispatch async compute tasks using recursive work splitting. If `false` async compute tasks will be launched using simple for loop in the caller thread."), ::llvm::cl::init(true)};
::mlir::Pass::Option<int32_t> numWorkerThreads{*this, "num-workers", ::llvm::cl::desc("The number of available workers to execute async operations. If `-1` the value will be retrieved from the runtime."), ::llvm::cl::init(8)};
::mlir::Pass::Option<int32_t> minTaskSize{*this, "min-task-size", ::llvm::cl::desc("The minimum task size for sharding parallel operation."), ::llvm::cl::init(1000)};
};
template <typename DerivedT>
class AsyncRuntimePolicyBasedRefCountingBase : public ::mlir::OperationPass<> {
public:
using Base = AsyncRuntimePolicyBasedRefCountingBase;
AsyncRuntimePolicyBasedRefCountingBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
AsyncRuntimePolicyBasedRefCountingBase(const AsyncRuntimePolicyBasedRefCountingBase &other) : ::mlir::OperationPass<>(other) {}
AsyncRuntimePolicyBasedRefCountingBase& operator=(const AsyncRuntimePolicyBasedRefCountingBase &) = delete;
AsyncRuntimePolicyBasedRefCountingBase(AsyncRuntimePolicyBasedRefCountingBase &&) = delete;
AsyncRuntimePolicyBasedRefCountingBase& operator=(AsyncRuntimePolicyBasedRefCountingBase &&) = delete;
~AsyncRuntimePolicyBasedRefCountingBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("async-runtime-policy-based-ref-counting");
}
::llvm::StringRef getArgument() const override { return "async-runtime-policy-based-ref-counting"; }
::llvm::StringRef getDescription() const override { return "Policy based reference counting for Async runtime operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("AsyncRuntimePolicyBasedRefCounting");
}
::llvm::StringRef getName() const override { return "AsyncRuntimePolicyBasedRefCounting"; }
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<async::AsyncDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(AsyncRuntimePolicyBasedRefCountingBase<DerivedT>)
protected:
};
template <typename DerivedT>
class AsyncRuntimeRefCountingBase : public ::mlir::OperationPass<> {
public:
using Base = AsyncRuntimeRefCountingBase;
AsyncRuntimeRefCountingBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
AsyncRuntimeRefCountingBase(const AsyncRuntimeRefCountingBase &other) : ::mlir::OperationPass<>(other) {}
AsyncRuntimeRefCountingBase& operator=(const AsyncRuntimeRefCountingBase &) = delete;
AsyncRuntimeRefCountingBase(AsyncRuntimeRefCountingBase &&) = delete;
AsyncRuntimeRefCountingBase& operator=(AsyncRuntimeRefCountingBase &&) = delete;
~AsyncRuntimeRefCountingBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("async-runtime-ref-counting");
}
::llvm::StringRef getArgument() const override { return "async-runtime-ref-counting"; }
::llvm::StringRef getDescription() const override { return "Automatic reference counting for Async runtime operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("AsyncRuntimeRefCounting");
}
::llvm::StringRef getName() const override { return "AsyncRuntimeRefCounting"; }
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<async::AsyncDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(AsyncRuntimeRefCountingBase<DerivedT>)
protected:
};
template <typename DerivedT>
class AsyncRuntimeRefCountingOptBase : public ::mlir::OperationPass<> {
public:
using Base = AsyncRuntimeRefCountingOptBase;
AsyncRuntimeRefCountingOptBase() : ::mlir::OperationPass<>(::mlir::TypeID::get<DerivedT>()) {}
AsyncRuntimeRefCountingOptBase(const AsyncRuntimeRefCountingOptBase &other) : ::mlir::OperationPass<>(other) {}
AsyncRuntimeRefCountingOptBase& operator=(const AsyncRuntimeRefCountingOptBase &) = delete;
AsyncRuntimeRefCountingOptBase(AsyncRuntimeRefCountingOptBase &&) = delete;
AsyncRuntimeRefCountingOptBase& operator=(AsyncRuntimeRefCountingOptBase &&) = delete;
~AsyncRuntimeRefCountingOptBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("async-runtime-ref-counting-opt");
}
::llvm::StringRef getArgument() const override { return "async-runtime-ref-counting-opt"; }
::llvm::StringRef getDescription() const override { return "Optimize automatic reference counting operations for theAsync runtime by removing redundant operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("AsyncRuntimeRefCountingOpt");
}
::llvm::StringRef getName() const override { return "AsyncRuntimeRefCountingOpt"; }
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<async::AsyncDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(AsyncRuntimeRefCountingOptBase<DerivedT>)
protected:
};
template <typename DerivedT>
class AsyncToAsyncRuntimeBase : public ::mlir::OperationPass<ModuleOp> {
public:
using Base = AsyncToAsyncRuntimeBase;
AsyncToAsyncRuntimeBase() : ::mlir::OperationPass<ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
AsyncToAsyncRuntimeBase(const AsyncToAsyncRuntimeBase &other) : ::mlir::OperationPass<ModuleOp>(other) {}
AsyncToAsyncRuntimeBase& operator=(const AsyncToAsyncRuntimeBase &) = delete;
AsyncToAsyncRuntimeBase(AsyncToAsyncRuntimeBase &&) = delete;
AsyncToAsyncRuntimeBase& operator=(AsyncToAsyncRuntimeBase &&) = delete;
~AsyncToAsyncRuntimeBase() = default;
static constexpr ::llvm::StringLiteral getArgumentName() {
return ::llvm::StringLiteral("async-to-async-runtime");
}
::llvm::StringRef getArgument() const override { return "async-to-async-runtime"; }
::llvm::StringRef getDescription() const override { return "Lower all high level async operations (e.g. async.execute) tothe explicit async.runtime and async.coro operations"; }
static constexpr ::llvm::StringLiteral getPassName() {
return ::llvm::StringLiteral("AsyncToAsyncRuntime");
}
::llvm::StringRef getName() const override { return "AsyncToAsyncRuntime"; }
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<async::AsyncDialect>();
registry.insert<func::FuncDialect>();
registry.insert<cf::ControlFlowDialect>();
}
MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(AsyncToAsyncRuntimeBase<DerivedT>)
protected:
};
#undef GEN_PASS_CLASSES
#endif