LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
llzk::polymorphic::impl::FlatteningPassBase< DerivedT > Class Template Reference
Inheritance diagram for llzk::polymorphic::impl::FlatteningPassBase< DerivedT >:
[legend]
Collaboration diagram for llzk::polymorphic::impl::FlatteningPassBase< DerivedT >:
[legend]

Public Types

using Base = FlatteningPassBase

Public Member Functions

 FlatteningPassBase ()
 FlatteningPassBase (const FlatteningPassBase &other)
FlatteningPassBaseoperator= (const FlatteningPassBase &)=delete
 FlatteningPassBase (FlatteningPassBase &&)=delete
FlatteningPassBaseoperator= (FlatteningPassBase &&)=delete
 ~FlatteningPassBase ()=default
::llvm::StringRef getArgument () const override
::llvm::StringRef getDescription () const override
::llvm::StringRef getName () const override
std::unique_ptr<::mlir::Pass > clonePass () const override
 A clone method to create a copy of this pass.
void getDependentDialects (::mlir::DialectRegistry &registry) const override
 Return the dialect that must be loaded in the context before this pass.
 FlatteningPassBase (FlatteningPassOptions options)
 Explicitly declare the TypeID for this class.

Static Public Member Functions

static constexpr ::llvm::StringLiteral getArgumentName ()
 Returns the command-line argument attached to this pass.
static constexpr ::llvm::StringLiteral getPassName ()
 Returns the derived pass name.
static bool classof (const ::mlir::Pass *pass)
 Support isa/dyn_cast functionality for the derived pass class.

Protected Attributes

::mlir::Pass::Option< unsigned > iterationLimit {*this, "max-iter", ::llvm::cl::desc("Maximum number of times the pass will run if a fixpoint is not reached earlier. Unrolling loops can provide more opportunities for instantiating structs but the converse is true as well. Thus, the pass will run multiple times until no further changes can be made or the upper limit provided in this option is reached."), ::llvm::cl::init(1000)}
::mlir::Pass::Option<::llzk::polymorphic::FlatteningCleanupModecleanupMode

Friends

std::unique_ptr<::mlir::Pass > createFlatteningPass ()
std::unique_ptr<::mlir::Pass > createFlatteningPass (FlatteningPassOptions options)

Detailed Description

template<typename DerivedT>
class llzk::polymorphic::impl::FlatteningPassBase< DerivedT >

Definition at line 124 of file FlatteningPass.cpp.

Member Typedef Documentation

◆ Base

template<typename DerivedT>
using llzk::polymorphic::impl::FlatteningPassBase< DerivedT >::Base = FlatteningPassBase

Definition at line 126 of file FlatteningPass.cpp.

Constructor & Destructor Documentation

◆ FlatteningPassBase() [1/4]

template<typename DerivedT>
llzk::polymorphic::impl::FlatteningPassBase< DerivedT >::FlatteningPassBase ( )
inline

Definition at line 128 of file FlatteningPass.cpp.

◆ FlatteningPassBase() [2/4]

template<typename DerivedT>
llzk::polymorphic::impl::FlatteningPassBase< DerivedT >::FlatteningPassBase ( const FlatteningPassBase< DerivedT > & other)
inline

Definition at line 129 of file FlatteningPass.cpp.

◆ FlatteningPassBase() [3/4]

template<typename DerivedT>
llzk::polymorphic::impl::FlatteningPassBase< DerivedT >::FlatteningPassBase ( FlatteningPassBase< DerivedT > && )
delete

◆ ~FlatteningPassBase()

template<typename DerivedT>
llzk::polymorphic::impl::FlatteningPassBase< DerivedT >::~FlatteningPassBase ( )
default

◆ FlatteningPassBase() [4/4]

template<typename DerivedT>
llzk::polymorphic::impl::FlatteningPassBase< DerivedT >::FlatteningPassBase ( FlatteningPassOptions options)
inline

Explicitly declare the TypeID for this class.

We declare an explicit private instantiation because Pass classes should only be visible by the current library.

Definition at line 181 of file FlatteningPass.cpp.

Member Function Documentation

◆ classof()

template<typename DerivedT>
bool llzk::polymorphic::impl::FlatteningPassBase< DerivedT >::classof ( const ::mlir::Pass * pass)
inlinestatic

Support isa/dyn_cast functionality for the derived pass class.

Definition at line 150 of file FlatteningPass.cpp.

◆ clonePass()

template<typename DerivedT>
std::unique_ptr<::mlir::Pass > llzk::polymorphic::impl::FlatteningPassBase< DerivedT >::clonePass ( ) const
inlineoverride

A clone method to create a copy of this pass.

Definition at line 155 of file FlatteningPass.cpp.

◆ getArgument()

template<typename DerivedT>
::llvm::StringRef llzk::polymorphic::impl::FlatteningPassBase< DerivedT >::getArgument ( ) const
inlineoverride

Definition at line 139 of file FlatteningPass.cpp.

◆ getArgumentName()

template<typename DerivedT>
constexpr ::llvm::StringLiteral llzk::polymorphic::impl::FlatteningPassBase< DerivedT >::getArgumentName ( )
inlinestatic

Returns the command-line argument attached to this pass.

Definition at line 136 of file FlatteningPass.cpp.

◆ getDependentDialects()

template<typename DerivedT>
void llzk::polymorphic::impl::FlatteningPassBase< DerivedT >::getDependentDialects ( ::mlir::DialectRegistry & registry) const
inlineoverride

Return the dialect that must be loaded in the context before this pass.

Definition at line 160 of file FlatteningPass.cpp.

◆ getDescription()

template<typename DerivedT>
::llvm::StringRef llzk::polymorphic::impl::FlatteningPassBase< DerivedT >::getDescription ( ) const
inlineoverride

Definition at line 141 of file FlatteningPass.cpp.

◆ getName()

template<typename DerivedT>
::llvm::StringRef llzk::polymorphic::impl::FlatteningPassBase< DerivedT >::getName ( ) const
inlineoverride

Definition at line 147 of file FlatteningPass.cpp.

◆ getPassName()

template<typename DerivedT>
constexpr ::llvm::StringLiteral llzk::polymorphic::impl::FlatteningPassBase< DerivedT >::getPassName ( )
inlinestatic

Returns the derived pass name.

Definition at line 144 of file FlatteningPass.cpp.

◆ operator=() [1/2]

template<typename DerivedT>
FlatteningPassBase & llzk::polymorphic::impl::FlatteningPassBase< DerivedT >::operator= ( const FlatteningPassBase< DerivedT > & )
delete

◆ operator=() [2/2]

template<typename DerivedT>
FlatteningPassBase & llzk::polymorphic::impl::FlatteningPassBase< DerivedT >::operator= ( FlatteningPassBase< DerivedT > && )
delete

◆ createFlatteningPass [1/2]

template<typename DerivedT>
std::unique_ptr<::mlir::Pass > createFlatteningPass ( )
friend

Definition at line 206 of file FlatteningPass.cpp.

◆ createFlatteningPass [2/2]

template<typename DerivedT>
std::unique_ptr<::mlir::Pass > createFlatteningPass ( FlatteningPassOptions options)
friend

Definition at line 210 of file FlatteningPass.cpp.

Member Data Documentation

◆ cleanupMode

template<typename DerivedT>
::mlir::Pass::Option<::llzk::polymorphic::FlatteningCleanupMode> llzk::polymorphic::impl::FlatteningPassBase< DerivedT >::cleanupMode
protected
Initial value:
{*this, "cleanup", ::llvm::cl::desc("Specifies the extent to which unused parameterized definitions (i.e. structs or free functions within a `poly.template`) are removed during the flattening pass."), ::llvm::cl::init(::llzk::polymorphic::FlatteningCleanupMode::Unspecified), ::llvm::cl::values(
"Use the cleanup mode specified by the calling pipeline (defaults to `preimage` if not specified)."),
"No definitions are deleted."),
"Only definitions that were replaced with concrete instantiations are deleted."),
"All definitions that cannot be reached by a use-def chain from some concrete definition are deleted."),
"All definitions that cannot be reached by a use-def chain from the \"Main\" struct are deleted.")
)}
::llvm::StringRef stringifyFlatteningCleanupMode(FlatteningCleanupMode val)

Definition at line 187 of file FlatteningPass.cpp.

◆ iterationLimit

template<typename DerivedT>
::mlir::Pass::Option<unsigned> llzk::polymorphic::impl::FlatteningPassBase< DerivedT >::iterationLimit {*this, "max-iter", ::llvm::cl::desc("Maximum number of times the pass will run if a fixpoint is not reached earlier. Unrolling loops can provide more opportunities for instantiating structs but the converse is true as well. Thus, the pass will run multiple times until no further changes can be made or the upper limit provided in this option is reached."), ::llvm::cl::init(1000)}
protected

Definition at line 186 of file FlatteningPass.cpp.


The documentation for this class was generated from the following file: