LLZK 0.1.0
Veridise's ZK Language IR
Loading...
Searching...
No Matches
llzk::component Namespace Reference

Namespaces

namespace  detail

Classes

class  CreateStructOp
class  CreateStructOpAdaptor
class  CreateStructOpGenericAdaptor
class  FieldDefOp
class  FieldDefOpAdaptor
class  FieldDefOpGenericAdaptor
class  FieldReadOp
class  FieldReadOpAdaptor
class  FieldReadOpGenericAdaptor
class  FieldRefOpInterface
class  FieldWriteOp
class  FieldWriteOpAdaptor
class  FieldWriteOpGenericAdaptor
struct  InStructFunctionNamed
 This class provides a verifier for ops that are expecting to have an ancestor FuncDefOp with the given name. More...
class  SetFuncAllowAttrs
 Only valid/implemented for StructDefOp. More...
class  StructDefOp
class  StructDefOpAdaptor
class  StructDefOpGenericAdaptor
class  StructDialect
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).
ParseResult parseStructParams (AsmParser &parser, ArrayAttr &value)
void printStructParams (AsmPrinter &printer, ArrayAttr value)
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.
mlir::ParseResult parseStructParams (mlir::AsmParser &parser, mlir::ArrayAttr &value)
void printStructParams (mlir::AsmPrinter &printer, mlir::ArrayAttr value)

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 105 of file Ops.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 83 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 41 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 52 of file Ops.cpp.

◆ parseStructParams() [1/2]

ParseResult llzk::component::parseStructParams ( AsmParser & parser,
ArrayAttr & value )

Definition at line 18 of file Types.cpp.

◆ parseStructParams() [2/2]

mlir::ParseResult llzk::component::parseStructParams ( mlir::AsmParser & parser,
mlir::ArrayAttr & value )

◆ printStructParams() [1/2]

void llzk::component::printStructParams ( AsmPrinter & printer,
ArrayAttr value )

Definition at line 34 of file Types.cpp.

◆ printStructParams() [2/2]

void llzk::component::printStructParams ( mlir::AsmPrinter & printer,
mlir::ArrayAttr value )

◆ 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 43 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 68 of file Ops.h.