LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
llzk::component Namespace Reference

Namespaces

namespace  detail
namespace  impl

Classes

class  CreateStructOp
class  CreateStructOpAdaptor
class  CreateStructOpGenericAdaptor
struct  InlineStructsPassOptions
struct  InStructFunctionNamed
 This class provides a verifier for ops that are expecting to have an ancestor FuncDefOp with the given name. More...
class  MemberDefOp
class  MemberDefOpAdaptor
class  MemberDefOpGenericAdaptor
class  MemberReadOp
class  MemberReadOpAdaptor
class  MemberReadOpGenericAdaptor
class  MemberRefOpInterface
class  MemberWriteOp
class  MemberWriteOpAdaptor
class  MemberWriteOpGenericAdaptor
class  SetFuncAllowAttrs
 Only valid/implemented for StructDefOp. More...
class  StructDefOp
class  StructDefOpAdaptor
class  StructDefOpGenericAdaptor
class  StructDialect
struct  StructDialectBytecodeInterface
 Implement version upgrade for StructDialect. More...
class  StructType

Functions

bool isInStruct (Operation *op)
FailureOr< StructDefOpverifyInStruct (Operation *op)
bool isInStructFunctionNamed (Operation *op, char const *funcName)
InFlightDiagnostic genCompareErr (StructDefOp expected, Operation *origin, const char *aspect)
LogicalResult checkSelfType (SymbolTableCollection &tables, StructDefOp expectedStruct, Type actualType, Operation *origin, const char *aspect)
 Verifies that the given actualType matches the StructDefOp given (i.e., for the "self" type parameter and return of the struct functions).
std::unique_ptr<::mlir::Pass > createInlineStructsPass ()
std::unique_ptr<::mlir::Pass > createInlineStructsPass (InlineStructsPassOptions options)
mlir::InFlightDiagnostic genCompareErr (StructDefOp expected, mlir::Operation *origin, const char *aspect)
mlir::LogicalResult checkSelfType (mlir::SymbolTableCollection &symbolTable, StructDefOp expectedStruct, mlir::Type actualType, mlir::Operation *origin, const char *aspect)
bool isInStruct (mlir::Operation *op)
 Return true iff the given Operation is nested somewhere within a StructDefOp.
mlir::FailureOr< StructDefOpverifyInStruct (mlir::Operation *op)
 If the given Operation is nested somewhere within a StructDefOp, return a success result containing that StructDefOp.
bool isInStructFunctionNamed (mlir::Operation *op, char const *funcName)
 Return true iff the given Operation is contained within a FuncDefOp with the given name that is itself contained within a StructDefOp.
template<char const * FuncName, unsigned PrefixLen>
mlir::LogicalResult verifyInStructFunctionNamed (mlir::Operation *op, llvm::function_ref< llvm::SmallString< PrefixLen >()> prefix)
 Checks if the given Operation is contained within a FuncDefOp with the given name that is itself contained within a StructDefOp, producing an error if not.
void registerInlineStructsPass ()
void registerInlineStructsPassPass ()
void registerTransformationPasses ()

Function Documentation

◆ checkSelfType() [1/2]

mlir::LogicalResult llzk::component::checkSelfType ( mlir::SymbolTableCollection & symbolTable,
StructDefOp expectedStruct,
mlir::Type actualType,
mlir::Operation * origin,
const char * aspect )

◆ checkSelfType() [2/2]

LogicalResult llzk::component::checkSelfType ( SymbolTableCollection & tables,
StructDefOp expectedStruct,
Type actualType,
Operation * origin,
const char * aspect )

Verifies that the given actualType matches the StructDefOp given (i.e., for the "self" type parameter and return of the struct functions).

Definition at line 121 of file Ops.cpp.

◆ createInlineStructsPass() [1/2]

std::unique_ptr<::mlir::Pass > llzk::component::createInlineStructsPass ( )

Definition at line 107 of file InlineStructsPass.cpp.

◆ createInlineStructsPass() [2/2]

std::unique_ptr<::mlir::Pass > llzk::component::createInlineStructsPass ( InlineStructsPassOptions options)

Definition at line 111 of file InlineStructsPass.cpp.

◆ genCompareErr() [1/2]

mlir::InFlightDiagnostic llzk::component::genCompareErr ( StructDefOp expected,
mlir::Operation * origin,
const char * aspect )

◆ genCompareErr() [2/2]

InFlightDiagnostic llzk::component::genCompareErr ( StructDefOp expected,
Operation * origin,
const char * aspect )

Definition at line 99 of file Ops.cpp.

◆ isInStruct() [1/2]

bool llzk::component::isInStruct ( mlir::Operation * op)

Return true iff the given Operation is nested somewhere within a StructDefOp.

◆ isInStruct() [2/2]

bool llzk::component::isInStruct ( Operation * op)

Definition at line 57 of file Ops.cpp.

◆ isInStructFunctionNamed() [1/2]

bool llzk::component::isInStructFunctionNamed ( mlir::Operation * op,
char const * funcName )

Return true iff the given Operation is contained within a FuncDefOp with the given name that is itself contained within a StructDefOp.

◆ isInStructFunctionNamed() [2/2]

bool llzk::component::isInStructFunctionNamed ( Operation * op,
char const * funcName )

Definition at line 67 of file Ops.cpp.

◆ registerInlineStructsPass()

void llzk::component::registerInlineStructsPass ( )
inline

Definition at line 122 of file TransformationPasses.h.

◆ registerInlineStructsPassPass()

void llzk::component::registerInlineStructsPassPass ( )
inline

Definition at line 129 of file TransformationPasses.h.

◆ registerTransformationPasses()

void llzk::component::registerTransformationPasses ( )
inline

Definition at line 139 of file TransformationPasses.h.

◆ verifyInStruct() [1/2]

mlir::FailureOr< StructDefOp > llzk::component::verifyInStruct ( mlir::Operation * op)

If the given Operation is nested somewhere within a StructDefOp, return a success result containing that StructDefOp.

Otherwise emit an error and return a failure result.

◆ verifyInStruct() [2/2]

FailureOr< StructDefOp > llzk::component::verifyInStruct ( Operation * op)

Definition at line 59 of file Ops.cpp.

◆ verifyInStructFunctionNamed()

template<char const * FuncName, unsigned PrefixLen>
mlir::LogicalResult llzk::component::verifyInStructFunctionNamed ( mlir::Operation * op,
llvm::function_ref< llvm::SmallString< PrefixLen >()> prefix )

Checks if the given Operation is contained within a FuncDefOp with the given name that is itself contained within a StructDefOp, producing an error if not.

Definition at line 72 of file Ops.h.