5#define GEN_PASS_DECL_INLINEINCLUDESPASS
12#ifdef GEN_PASS_DECL_INLINEINCLUDESPASS
14#undef GEN_PASS_DECL_INLINEINCLUDESPASS
16#ifdef GEN_PASS_DEF_INLINEINCLUDESPASS
23template <
typename DerivedT>
24class InlineIncludesPassBase :
public ::mlir::OperationPass<::mlir::ModuleOp> {
26 using Base = InlineIncludesPassBase;
28 InlineIncludesPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
29 InlineIncludesPassBase(
const InlineIncludesPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
30 InlineIncludesPassBase& operator=(
const InlineIncludesPassBase &) =
delete;
31 InlineIncludesPassBase(InlineIncludesPassBase &&) =
delete;
32 InlineIncludesPassBase& operator=(InlineIncludesPassBase &&) =
delete;
33 ~InlineIncludesPassBase() =
default;
36 static constexpr ::llvm::StringLiteral getArgumentName() {
37 return ::llvm::StringLiteral(
"llzk-inline-includes");
39 ::llvm::StringRef getArgument()
const override {
return "llzk-inline-includes"; }
41 ::llvm::StringRef getDescription()
const override {
return "Replace all IncludeOp with contents of the referenced file."; }
44 static constexpr ::llvm::StringLiteral getPassName() {
45 return ::llvm::StringLiteral(
"InlineIncludesPass");
47 ::llvm::StringRef getName()
const override {
return "InlineIncludesPass"; }
50 static bool classof(const ::mlir::Pass *pass) {
51 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
55 std::unique_ptr<::mlir::Pass> clonePass()
const override {
56 return std::make_unique<DerivedT>(*
static_cast<const DerivedT *
>(
this));
60 void getDependentDialects(::mlir::DialectRegistry ®istry)
const override {
61 registry.insert<llzk::LLZKDialect>();
62 registry.insert<llzk::boolean::BoolDialect>();
63 registry.insert<llzk::array::ArrayDialect>();
64 registry.insert<llzk::component::StructDialect>();
65 registry.insert<llzk::constrain::ConstrainDialect>();
66 registry.insert<llzk::felt::FeltDialect>();
67 registry.insert<llzk::global::GlobalDialect>();
68 registry.insert<llzk::include::IncludeDialect>();
69 registry.insert<llzk::function::FunctionDialect>();
70 registry.insert<llzk::string::StringDialect>();
71 registry.insert<llzk::polymorphic::PolymorphicDialect>();
72 registry.insert<mlir::arith::ArithDialect>();
73 registry.insert<mlir::scf::SCFDialect>();
79 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(InlineIncludesPassBase<DerivedT>)
85 return std::make_unique<DerivedT>();
91 return impl::createInlineIncludesPass();
93#undef GEN_PASS_DEF_INLINEINCLUDESPASS
95#ifdef GEN_PASS_REGISTRATION
102 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
109 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
121#undef GEN_PASS_REGISTRATION
124#ifdef GEN_PASS_CLASSES
126template <
typename DerivedT>
127class InlineIncludesPassBase :
public ::mlir::OperationPass<::mlir::ModuleOp> {
129 using Base = InlineIncludesPassBase;
131 InlineIncludesPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
132 InlineIncludesPassBase(
const InlineIncludesPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
133 InlineIncludesPassBase& operator=(
const InlineIncludesPassBase &) =
delete;
134 InlineIncludesPassBase(InlineIncludesPassBase &&) =
delete;
135 InlineIncludesPassBase& operator=(InlineIncludesPassBase &&) =
delete;
136 ~InlineIncludesPassBase() =
default;
139 static constexpr ::llvm::StringLiteral getArgumentName() {
140 return ::llvm::StringLiteral(
"llzk-inline-includes");
142 ::llvm::StringRef getArgument()
const override {
return "llzk-inline-includes"; }
144 ::llvm::StringRef getDescription()
const override {
return "Replace all IncludeOp with contents of the referenced file."; }
147 static constexpr ::llvm::StringLiteral getPassName() {
148 return ::llvm::StringLiteral(
"InlineIncludesPass");
150 ::llvm::StringRef getName()
const override {
return "InlineIncludesPass"; }
153 static bool classof(const ::mlir::Pass *pass) {
154 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
158 std::unique_ptr<::mlir::Pass> clonePass()
const override {
159 return std::make_unique<DerivedT>(*
static_cast<const DerivedT *
>(
this));
163 void getDependentDialects(::mlir::DialectRegistry ®istry)
const override {
164 registry.insert<llzk::LLZKDialect>();
165 registry.insert<llzk::boolean::BoolDialect>();
166 registry.insert<llzk::array::ArrayDialect>();
167 registry.insert<llzk::component::StructDialect>();
168 registry.insert<llzk::constrain::ConstrainDialect>();
169 registry.insert<llzk::felt::FeltDialect>();
170 registry.insert<llzk::global::GlobalDialect>();
171 registry.insert<llzk::include::IncludeDialect>();
172 registry.insert<llzk::function::FunctionDialect>();
173 registry.insert<llzk::string::StringDialect>();
174 registry.insert<llzk::polymorphic::PolymorphicDialect>();
175 registry.insert<mlir::arith::ArithDialect>();
176 registry.insert<mlir::scf::SCFDialect>();
182 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(InlineIncludesPassBase<DerivedT>)
186#undef GEN_PASS_CLASSES
void registerTransformationPasses()
std::unique_ptr<::mlir::Pass > createInlineIncludesPass()
void registerInlineIncludesPassPass()
void registerInlineIncludesPass()