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 R
"PD(Replace all IncludeOp with contents of the referenced file.)PD"; }
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
97#define GEN_PASS_REGISTRATION_INLINEINCLUDESPASS
103#ifdef GEN_PASS_REGISTRATION_INLINEINCLUDESPASS
106 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
113 ::mlir::registerPass([]() -> std::unique_ptr<::mlir::Pass> {
118#undef GEN_PASS_REGISTRATION_INLINEINCLUDESPASS
120#ifdef GEN_PASS_REGISTRATION
129#undef GEN_PASS_REGISTRATION
131#ifdef GEN_PASS_CLASSES
132#error "GEN_PASS_CLASSES is deprecated; use per-pass macros"
133#undef GEN_PASS_CLASSES
void registerTransformationPasses()
std::unique_ptr<::mlir::Pass > createInlineIncludesPass()
void registerInlineIncludesPassPass()
void registerInlineIncludesPass()