5#define GEN_PASS_DECL_INLINEINCLUDESPASS
12#ifdef GEN_PASS_DECL_INLINEINCLUDESPASS
13#undef GEN_PASS_DECL_INLINEINCLUDESPASS
15#ifdef GEN_PASS_DEF_INLINEINCLUDESPASS
18template <
typename DerivedT>
19class InlineIncludesPassBase :
public ::mlir::OperationPass<::mlir::ModuleOp> {
21 using Base = InlineIncludesPassBase;
23 InlineIncludesPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
24 InlineIncludesPassBase(
const InlineIncludesPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
25 InlineIncludesPassBase& operator=(
const InlineIncludesPassBase &) =
delete;
26 InlineIncludesPassBase(InlineIncludesPassBase &&) =
delete;
27 InlineIncludesPassBase& operator=(InlineIncludesPassBase &&) =
delete;
28 ~InlineIncludesPassBase() =
default;
31 static constexpr ::llvm::StringLiteral getArgumentName() {
32 return ::llvm::StringLiteral(
"llzk-inline-includes");
34 ::llvm::StringRef getArgument()
const override {
return "llzk-inline-includes"; }
36 ::llvm::StringRef getDescription()
const override {
return "Replace all IncludeOp with contents of the referenced file."; }
39 static constexpr ::llvm::StringLiteral getPassName() {
40 return ::llvm::StringLiteral(
"InlineIncludesPass");
42 ::llvm::StringRef getName()
const override {
return "InlineIncludesPass"; }
45 static bool classof(const ::mlir::Pass *pass) {
46 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
50 std::unique_ptr<::mlir::Pass> clonePass()
const override {
51 return std::make_unique<DerivedT>(*
static_cast<const DerivedT *
>(
this));
55 void getDependentDialects(::mlir::DialectRegistry ®istry)
const override {
56 registry.insert<llzk::LLZKDialect>();
57 registry.insert<llzk::boolean::BoolDialect>();
58 registry.insert<llzk::array::ArrayDialect>();
59 registry.insert<llzk::component::StructDialect>();
60 registry.insert<llzk::constrain::ConstrainDialect>();
61 registry.insert<llzk::felt::FeltDialect>();
62 registry.insert<llzk::global::GlobalDialect>();
63 registry.insert<llzk::include::IncludeDialect>();
64 registry.insert<llzk::function::FunctionDialect>();
65 registry.insert<llzk::string::StringDialect>();
66 registry.insert<llzk::polymorphic::PolymorphicDialect>();
67 registry.insert<llzk::undef::UndefDialect>();
68 registry.insert<mlir::arith::ArithDialect>();
69 registry.insert<mlir::scf::SCFDialect>();
75 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(InlineIncludesPassBase<DerivedT>)
81#undef GEN_PASS_DEF_INLINEINCLUDESPASS
83#ifdef GEN_PASS_REGISTRATION
90 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
97 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
109#undef GEN_PASS_REGISTRATION
112#ifdef GEN_PASS_CLASSES
114template <
typename DerivedT>
115class InlineIncludesPassBase :
public ::mlir::OperationPass<::mlir::ModuleOp> {
117 using Base = InlineIncludesPassBase;
119 InlineIncludesPassBase() : ::mlir::OperationPass<::mlir::ModuleOp>(::mlir::TypeID::get<DerivedT>()) {}
120 InlineIncludesPassBase(
const InlineIncludesPassBase &other) : ::mlir::OperationPass<::mlir::ModuleOp>(other) {}
121 InlineIncludesPassBase& operator=(
const InlineIncludesPassBase &) =
delete;
122 InlineIncludesPassBase(InlineIncludesPassBase &&) =
delete;
123 InlineIncludesPassBase& operator=(InlineIncludesPassBase &&) =
delete;
124 ~InlineIncludesPassBase() =
default;
127 static constexpr ::llvm::StringLiteral getArgumentName() {
128 return ::llvm::StringLiteral(
"llzk-inline-includes");
130 ::llvm::StringRef getArgument()
const override {
return "llzk-inline-includes"; }
132 ::llvm::StringRef getDescription()
const override {
return "Replace all IncludeOp with contents of the referenced file."; }
135 static constexpr ::llvm::StringLiteral getPassName() {
136 return ::llvm::StringLiteral(
"InlineIncludesPass");
138 ::llvm::StringRef getName()
const override {
return "InlineIncludesPass"; }
141 static bool classof(const ::mlir::Pass *pass) {
142 return pass->getTypeID() == ::mlir::TypeID::get<DerivedT>();
146 std::unique_ptr<::mlir::Pass> clonePass()
const override {
147 return std::make_unique<DerivedT>(*
static_cast<const DerivedT *
>(
this));
151 void getDependentDialects(::mlir::DialectRegistry ®istry)
const override {
152 registry.insert<llzk::LLZKDialect>();
153 registry.insert<llzk::boolean::BoolDialect>();
154 registry.insert<llzk::array::ArrayDialect>();
155 registry.insert<llzk::component::StructDialect>();
156 registry.insert<llzk::constrain::ConstrainDialect>();
157 registry.insert<llzk::felt::FeltDialect>();
158 registry.insert<llzk::global::GlobalDialect>();
159 registry.insert<llzk::include::IncludeDialect>();
160 registry.insert<llzk::function::FunctionDialect>();
161 registry.insert<llzk::string::StringDialect>();
162 registry.insert<llzk::polymorphic::PolymorphicDialect>();
163 registry.insert<llzk::undef::UndefDialect>();
164 registry.insert<mlir::arith::ArithDialect>();
165 registry.insert<mlir::scf::SCFDialect>();
171 MLIR_DEFINE_EXPLICIT_INTERNAL_INLINE_TYPE_ID(InlineIncludesPassBase<DerivedT>)
175#undef GEN_PASS_CLASSES
void registerTransformationPasses()
std::unique_ptr< mlir::Pass > createInlineIncludesPass()
void registerInlineIncludesPassPass()
void registerInlineIncludesPass()