LLZK 2.1.1
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
Inheritance diagram for llzk::verif::ContractOp:
[legend]
Collaboration diagram for llzk::verif::ContractOp:
[legend]

Public Types

using Adaptor = ContractOpAdaptor
template<typename RangeT>
using GenericAdaptor = ContractOpGenericAdaptor<RangeT>
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>
using Properties = FoldAdaptor::Properties

Public Member Functions

static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames ()
::mlir::StringAttr getArgAttrsAttrName ()
::mlir::StringAttr getFunctionTypeAttrName ()
::mlir::StringAttr getSymNameAttrName ()
::mlir::StringAttr getTargetAttrName ()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength (unsigned index)
::mlir::Operation::operand_range getODSOperands (unsigned index)
std::pair< unsigned, unsigned > getODSResultIndexAndLength (unsigned index)
::mlir::Operation::result_range getODSResults (unsigned index)
::mlir::Region & getBody ()
void writeProperties (::mlir::DialectBytecodeWriter &writer)
::mlir::StringAttr getSymNameAttr ()
::llvm::StringRef getSymName ()
::mlir::SymbolRefAttr getTargetAttr ()
::mlir::SymbolRefAttr getTarget ()
::mlir::TypeAttr getFunctionTypeAttr ()
::mlir::FunctionType getFunctionType ()
::mlir::ArrayAttr getArgAttrsAttr ()
::std::optional< ::mlir::ArrayAttr > getArgAttrs ()
void setSymNameAttr (::mlir::StringAttr attr)
void setSymName (::llvm::StringRef attrValue)
void setTargetAttr (::mlir::SymbolRefAttr attr)
void setFunctionTypeAttr (::mlir::TypeAttr attr)
void setFunctionType (::mlir::FunctionType attrValue)
void setArgAttrsAttr (::mlir::ArrayAttr attr)
::mlir::Attribute removeArgAttrsAttr ()
void print (::mlir::OpAsmPrinter &p)
::llvm::LogicalResult verifyInvariantsImpl ()
::llvm::LogicalResult verifyInvariants ()
::llvm::LogicalResult verify ()
::llvm::LogicalResult verifyRegions ()
::llvm::LogicalResult verifySymbolUses (::mlir::SymbolTableCollection &symbolTable)
ContractOp clone (::mlir::IRMapping &mapper)
 Create a deep copy of this contract and all of its blocks, remapping any operands that use values outside of the contract using the map that is provided (leaving them alone if no entry is present).
ContractOp clone ()
void cloneInto (ContractOp dest, ::mlir::IRMapping &mapper)
 Clone the internal blocks and attributes from this contract into dest.
bool hasArgPublicAttr (unsigned index)
 Return true iff the argument at the given index has pub attribute.
bool hasArgName (unsigned index)
 Return true iff the argument at the given index has a function.arg_name attribute.
::std::optional<::mlir::StringAttr > getArgNameAttr (unsigned index)
 Return the function.arg_name attribute for the argument at the given index.
void setArgNameAttr (unsigned index, const ::mlir::StringAttr &attr)
 Set the function.arg_name attribute for the argument at the given index.
void setArgName (unsigned index, ::llvm::StringRef name)
 Set the function.arg_name attribute for the argument at the given index from a string.
::mlir::Region * getCallableRegion ()
 Required by FunctionOpInterface.
::llvm::ArrayRef<::mlir::Type > getArgumentTypes ()
 Required by FunctionOpInterface.
::llvm::ArrayRef<::mlir::Type > getResultTypes ()
 Required by FunctionOpInterface.
bool isDeclaration ()
 Required by SymbolOpInterface.
::mlir::SymbolRefAttr getFullyQualifiedName (bool requireParent=true)
 Return the full name for this contract from the root module, including all surrounding symbol table names (i.e., modules and structs).
bool hasStructTarget ()
 Return true iff the contract targets a struct type.
::mlir::FailureOr< SymbolLookupResult< component::StructDefOp > > getStructTarget (::mlir::SymbolTableCollection &tables)
 Return the StructDefOp that this contract targets, or failure if it does not target a struct or the struct is not found.
::mlir::FailureOr< SymbolLookupResult< component::StructDefOp > > getStructTarget ()
::mlir::FailureOr<::mlir::Value > getSelfValue ()
 Return the "self" value (i.e.
bool hasFuncTarget ()
 Return true iff the contract targets a function.
::mlir::FailureOr< SymbolLookupResult< function::FuncDefOp > > getFuncTarget (::mlir::SymbolTableCollection &tables)
 Return the FuncDefOp that this contract targets, or failure if it does not target a function or the function is not found.
::mlir::FailureOr< SymbolLookupResult< function::FuncDefOp > > getFuncTarget ()

Static Public Member Functions

::mlir::StringAttr getArgAttrsAttrName (::mlir::OperationName name)
::mlir::StringAttr getFunctionTypeAttrName (::mlir::OperationName name)
::mlir::StringAttr getSymNameAttrName (::mlir::OperationName name)
::mlir::StringAttr getTargetAttrName (::mlir::OperationName name)
static constexpr ::llvm::StringLiteral getOperationName ()
::llvm::LogicalResult setPropertiesFromAttr (Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::Attribute getPropertiesAsAttr (::mlir::MLIRContext *ctx, const Properties &prop)
static llvm::hash_code computePropertiesHash (const Properties &prop)
static std::optional< mlir::Attribute > getInherentAttr (::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static void setInherentAttr (Properties &prop, llvm::StringRef name, mlir::Attribute value)
static void populateInherentAttrs (::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::llvm::LogicalResult verifyInherentAttrs (::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::llvm::LogicalResult readProperties (::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
static void build (::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::SymbolRefAttr target, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs={})
static void build (::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name, ::mlir::SymbolRefAttr target, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs={})
static void build (::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name, ::mlir::SymbolRefAttr target, ::mlir::FunctionType function_type, ::mlir::ArrayAttr arg_attrs={})
static void build (::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name, ::mlir::SymbolRefAttr target, ::mlir::FunctionType function_type, ::mlir::ArrayAttr arg_attrs={})
static void build (::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef name, llvm::StringRef target)
static void build (::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef name, ::mlir::SymbolRefAttr target)
::mlir::ParseResult parse (::mlir::OpAsmParser &parser, ::mlir::OperationState &result)

Detailed Description

Definition at line 328 of file Ops.h.inc.

Member Typedef Documentation

◆ Adaptor

Definition at line 332 of file Ops.h.inc.

◆ FoldAdaptor

using llzk::verif::ContractOp::FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>

Definition at line 335 of file Ops.h.inc.

◆ GenericAdaptor

template<typename RangeT>
using llzk::verif::ContractOp::GenericAdaptor = ContractOpGenericAdaptor<RangeT>

Definition at line 334 of file Ops.h.inc.

◆ Properties

Member Function Documentation

◆ build() [1/6]

void llzk::verif::ContractOp::build ( ::mlir::OpBuilder & odsBuilder,
::mlir::OperationState & odsState,
::llvm::StringRef name,
::mlir::SymbolRefAttr target )
static

Definition at line 332 of file Ops.cpp.

◆ build() [2/6]

void llzk::verif::ContractOp::build ( ::mlir::OpBuilder & odsBuilder,
::mlir::OperationState & odsState,
::llvm::StringRef name,
llvm::StringRef target )
static

◆ build() [3/6]

void llzk::verif::ContractOp::build ( ::mlir::OpBuilder & odsBuilder,
::mlir::OperationState & odsState,
::llvm::StringRef sym_name,
::mlir::SymbolRefAttr target,
::mlir::FunctionType function_type,
::mlir::ArrayAttr arg_attrs = {} )
static

Definition at line 532 of file Ops.cpp.inc.

◆ build() [4/6]

void llzk::verif::ContractOp::build ( ::mlir::OpBuilder & odsBuilder,
::mlir::OperationState & odsState,
::mlir::StringAttr sym_name,
::mlir::SymbolRefAttr target,
::mlir::TypeAttr function_type,
::mlir::ArrayAttr arg_attrs = {} )
static

Definition at line 512 of file Ops.cpp.inc.

◆ build() [5/6]

void llzk::verif::ContractOp::build ( ::mlir::OpBuilder & odsBuilder,
::mlir::OperationState & odsState,
::mlir::TypeRange resultTypes,
::llvm::StringRef sym_name,
::mlir::SymbolRefAttr target,
::mlir::FunctionType function_type,
::mlir::ArrayAttr arg_attrs = {} )
static

Definition at line 537 of file Ops.cpp.inc.

◆ build() [6/6]

void llzk::verif::ContractOp::build ( ::mlir::OpBuilder & odsBuilder,
::mlir::OperationState & odsState,
::mlir::TypeRange resultTypes,
::mlir::StringAttr sym_name,
::mlir::SymbolRefAttr target,
::mlir::TypeAttr function_type,
::mlir::ArrayAttr arg_attrs = {} )
static

Definition at line 517 of file Ops.cpp.inc.

◆ clone() [1/2]

ContractOp llzk::verif::ContractOp::clone ( )

◆ clone() [2/2]

ContractOp llzk::verif::ContractOp::clone ( ::mlir::IRMapping & mapper)

Create a deep copy of this contract and all of its blocks, remapping any operands that use values outside of the contract using the map that is provided (leaving them alone if no entry is present).

If the mapper contains entries for contract arguments, these arguments are not included in the new contract. Replaces references to cloned sub-values with the corresponding value that is copied, and adds those mappings to the mapper.

◆ cloneInto()

void llzk::verif::ContractOp::cloneInto ( ContractOp dest,
::mlir::IRMapping & mapper )

Clone the internal blocks and attributes from this contract into dest.

Any cloned blocks are appended to the back of dest. This contract asserts that the attributes of the current contract and dest are compatible.

◆ computePropertiesHash()

llvm::hash_code llzk::verif::ContractOp::computePropertiesHash ( const Properties & prop)
static

Definition at line 377 of file Ops.cpp.inc.

◆ getArgAttrs()

std::optional<::mlir::ArrayAttr > llzk::verif::ContractOp::getArgAttrs ( )

Definition at line 499 of file Ops.cpp.inc.

◆ getArgAttrsAttr()

::mlir::ArrayAttr llzk::verif::ContractOp::getArgAttrsAttr ( )
inline

Definition at line 426 of file Ops.h.inc.

◆ getArgAttrsAttrName() [1/2]

::mlir::StringAttr llzk::verif::ContractOp::getArgAttrsAttrName ( )
inline

Definition at line 342 of file Ops.h.inc.

◆ getArgAttrsAttrName() [2/2]

::mlir::StringAttr llzk::verif::ContractOp::getArgAttrsAttrName ( ::mlir::OperationName name)
inlinestatic

Definition at line 346 of file Ops.h.inc.

◆ getArgNameAttr()

std::optional< StringAttr > llzk::verif::ContractOp::getArgNameAttr ( unsigned index)

Return the function.arg_name attribute for the argument at the given index.

Definition at line 368 of file Ops.cpp.

◆ getArgumentTypes()

::llvm::ArrayRef<::mlir::Type > llzk::verif::ContractOp::getArgumentTypes ( )
inline

Required by FunctionOpInterface.

Returns the argument types of this contract.

Definition at line 519 of file Ops.h.inc.

◆ getAttributeNames()

::llvm::ArrayRef<::llvm::StringRef > llzk::verif::ContractOp::getAttributeNames ( )
inline

Definition at line 337 of file Ops.h.inc.

◆ getBody()

::mlir::Region & llzk::verif::ContractOp::getBody ( )
inline

Definition at line 398 of file Ops.h.inc.

◆ getCallableRegion()

::mlir::Region * llzk::verif::ContractOp::getCallableRegion ( )
inline

Required by FunctionOpInterface.

Returns the region on the current operation that is callable.

Definition at line 515 of file Ops.h.inc.

◆ getFullyQualifiedName()

SymbolRefAttr llzk::verif::ContractOp::getFullyQualifiedName ( bool requireParent = true)

Return the full name for this contract from the root module, including all surrounding symbol table names (i.e., modules and structs).

Definition at line 387 of file Ops.cpp.

◆ getFuncTarget() [1/2]

::mlir::FailureOr< SymbolLookupResult< function::FuncDefOp > > llzk::verif::ContractOp::getFuncTarget ( )
inline

Definition at line 556 of file Ops.h.inc.

◆ getFuncTarget() [2/2]

::mlir::FailureOr< SymbolLookupResult< function::FuncDefOp > > llzk::verif::ContractOp::getFuncTarget ( ::mlir::SymbolTableCollection & tables)

Return the FuncDefOp that this contract targets, or failure if it does not target a function or the function is not found.

◆ getFunctionType()

mlir::FunctionType llzk::verif::ContractOp::getFunctionType ( )

Definition at line 494 of file Ops.cpp.inc.

◆ getFunctionTypeAttr()

::mlir::TypeAttr llzk::verif::ContractOp::getFunctionTypeAttr ( )
inline

Definition at line 421 of file Ops.h.inc.

◆ getFunctionTypeAttrName() [1/2]

::mlir::StringAttr llzk::verif::ContractOp::getFunctionTypeAttrName ( )
inline

Definition at line 350 of file Ops.h.inc.

◆ getFunctionTypeAttrName() [2/2]

::mlir::StringAttr llzk::verif::ContractOp::getFunctionTypeAttrName ( ::mlir::OperationName name)
inlinestatic

Definition at line 354 of file Ops.h.inc.

◆ getInherentAttr()

std::optional< mlir::Attribute > llzk::verif::ContractOp::getInherentAttr ( ::mlir::MLIRContext * ctx,
const Properties & prop,
llvm::StringRef name )
static

Definition at line 385 of file Ops.cpp.inc.

◆ getODSOperandIndexAndLength()

std::pair< unsigned, unsigned > llzk::verif::ContractOp::getODSOperandIndexAndLength ( unsigned index)
inline

Definition at line 378 of file Ops.h.inc.

◆ getODSOperands()

::mlir::Operation::operand_range llzk::verif::ContractOp::getODSOperands ( unsigned index)
inline

Definition at line 382 of file Ops.h.inc.

◆ getODSResultIndexAndLength()

std::pair< unsigned, unsigned > llzk::verif::ContractOp::getODSResultIndexAndLength ( unsigned index)
inline

Definition at line 388 of file Ops.h.inc.

◆ getODSResults()

::mlir::Operation::result_range llzk::verif::ContractOp::getODSResults ( unsigned index)
inline

Definition at line 392 of file Ops.h.inc.

◆ getOperationName()

constexpr ::llvm::StringLiteral llzk::verif::ContractOp::getOperationName ( )
inlinestatic

Definition at line 374 of file Ops.h.inc.

◆ getPropertiesAsAttr()

mlir::Attribute llzk::verif::ContractOp::getPropertiesAsAttr ( ::mlir::MLIRContext * ctx,
const Properties & prop )
static

Definition at line 340 of file Ops.cpp.inc.

◆ getResultTypes()

::llvm::ArrayRef<::mlir::Type > llzk::verif::ContractOp::getResultTypes ( )
inline

Required by FunctionOpInterface.

Returns the result types of this contract. Since contracts don't have return values, the returned ArrayRef will always be empty.

Definition at line 524 of file Ops.h.inc.

◆ getSelfValue()

FailureOr< Value > llzk::verif::ContractOp::getSelfValue ( )

Return the "self" value (i.e.

the first parameter) from the contract, or failure if the contract does not target a struct.

Definition at line 702 of file Ops.cpp.

◆ getStructTarget() [1/2]

::mlir::FailureOr< SymbolLookupResult< component::StructDefOp > > llzk::verif::ContractOp::getStructTarget ( )
inline

Definition at line 540 of file Ops.h.inc.

◆ getStructTarget() [2/2]

::mlir::FailureOr< SymbolLookupResult< component::StructDefOp > > llzk::verif::ContractOp::getStructTarget ( ::mlir::SymbolTableCollection & tables)

Return the StructDefOp that this contract targets, or failure if it does not target a struct or the struct is not found.

◆ getSymName()

llvm::StringRef llzk::verif::ContractOp::getSymName ( )

Definition at line 484 of file Ops.cpp.inc.

◆ getSymNameAttr()

::mlir::StringAttr llzk::verif::ContractOp::getSymNameAttr ( )
inline

Definition at line 411 of file Ops.h.inc.

◆ getSymNameAttrName() [1/2]

::mlir::StringAttr llzk::verif::ContractOp::getSymNameAttrName ( )
inline

Definition at line 358 of file Ops.h.inc.

◆ getSymNameAttrName() [2/2]

::mlir::StringAttr llzk::verif::ContractOp::getSymNameAttrName ( ::mlir::OperationName name)
inlinestatic

Definition at line 362 of file Ops.h.inc.

◆ getTarget()

mlir::SymbolRefAttr llzk::verif::ContractOp::getTarget ( )

Definition at line 489 of file Ops.cpp.inc.

◆ getTargetAttr()

::mlir::SymbolRefAttr llzk::verif::ContractOp::getTargetAttr ( )
inline

Definition at line 416 of file Ops.h.inc.

◆ getTargetAttrName() [1/2]

::mlir::StringAttr llzk::verif::ContractOp::getTargetAttrName ( )
inline

Definition at line 366 of file Ops.h.inc.

◆ getTargetAttrName() [2/2]

::mlir::StringAttr llzk::verif::ContractOp::getTargetAttrName ( ::mlir::OperationName name)
inlinestatic

Definition at line 370 of file Ops.h.inc.

◆ hasArgName()

bool llzk::verif::ContractOp::hasArgName ( unsigned index)

Return true iff the argument at the given index has a function.arg_name attribute.

Definition at line 366 of file Ops.cpp.

◆ hasArgPublicAttr()

bool llzk::verif::ContractOp::hasArgPublicAttr ( unsigned index)

Return true iff the argument at the given index has pub attribute.

Definition at line 358 of file Ops.cpp.

◆ hasFuncTarget()

bool llzk::verif::ContractOp::hasFuncTarget ( )
inline

Return true iff the contract targets a function.

Definition at line 550 of file Ops.h.inc.

◆ hasStructTarget()

bool llzk::verif::ContractOp::hasStructTarget ( )
inline

Return true iff the contract targets a struct type.

Definition at line 534 of file Ops.h.inc.

◆ isDeclaration()

bool llzk::verif::ContractOp::isDeclaration ( )
inline

Required by SymbolOpInterface.

Definition at line 527 of file Ops.h.inc.

◆ parse()

ParseResult llzk::verif::ContractOp::parse ( ::mlir::OpAsmParser & parser,
::mlir::OperationState & result )
static

Definition at line 452 of file Ops.cpp.

◆ populateInherentAttrs()

void llzk::verif::ContractOp::populateInherentAttrs ( ::mlir::MLIRContext * ctx,
const Properties & prop,
::mlir::NamedAttrList & attrs )
static

Definition at line 422 of file Ops.cpp.inc.

◆ print()

void llzk::verif::ContractOp::print ( ::mlir::OpAsmPrinter & p)

Definition at line 559 of file Ops.cpp.

◆ readProperties()

llvm::LogicalResult llzk::verif::ContractOp::readProperties ( ::mlir::DialectBytecodeReader & reader,
::mlir::OperationState & state )
static

Definition at line 459 of file Ops.cpp.inc.

◆ removeArgAttrsAttr()

::mlir::Attribute llzk::verif::ContractOp::removeArgAttrsAttr ( )
inline

Definition at line 449 of file Ops.h.inc.

◆ setArgAttrsAttr()

void llzk::verif::ContractOp::setArgAttrsAttr ( ::mlir::ArrayAttr attr)
inline

Definition at line 445 of file Ops.h.inc.

◆ setArgName()

void llzk::verif::ContractOp::setArgName ( unsigned index,
::llvm::StringRef name )

Set the function.arg_name attribute for the argument at the given index from a string.

Definition at line 383 of file Ops.cpp.

◆ setArgNameAttr()

void llzk::verif::ContractOp::setArgNameAttr ( unsigned index,
const ::mlir::StringAttr & attr )

Set the function.arg_name attribute for the argument at the given index.

Definition at line 378 of file Ops.cpp.

◆ setFunctionType()

void llzk::verif::ContractOp::setFunctionType ( ::mlir::FunctionType attrValue)

Definition at line 508 of file Ops.cpp.inc.

◆ setFunctionTypeAttr()

void llzk::verif::ContractOp::setFunctionTypeAttr ( ::mlir::TypeAttr attr)
inline

Definition at line 440 of file Ops.h.inc.

◆ setInherentAttr()

void llzk::verif::ContractOp::setInherentAttr ( Properties & prop,
llvm::StringRef name,
mlir::Attribute value )
static

Definition at line 400 of file Ops.cpp.inc.

◆ setPropertiesFromAttr()

llvm::LogicalResult llzk::verif::ContractOp::setPropertiesFromAttr ( Properties & prop,
::mlir::Attribute attr,
::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError )
static

Definition at line 275 of file Ops.cpp.inc.

◆ setSymName()

void llzk::verif::ContractOp::setSymName ( ::llvm::StringRef attrValue)

Definition at line 504 of file Ops.cpp.inc.

◆ setSymNameAttr()

void llzk::verif::ContractOp::setSymNameAttr ( ::mlir::StringAttr attr)
inline

Definition at line 431 of file Ops.h.inc.

◆ setTargetAttr()

void llzk::verif::ContractOp::setTargetAttr ( ::mlir::SymbolRefAttr attr)
inline

Definition at line 436 of file Ops.h.inc.

◆ verify()

LogicalResult llzk::verif::ContractOp::verify ( )

Definition at line 586 of file Ops.cpp.

◆ verifyInherentAttrs()

llvm::LogicalResult llzk::verif::ContractOp::verifyInherentAttrs ( ::mlir::OperationName opName,
::mlir::NamedAttrList & attrs,
llvm::function_ref<::mlir::InFlightDiagnostic()> emitError )
static

Definition at line 432 of file Ops.cpp.inc.

◆ verifyInvariants()

llvm::LogicalResult llzk::verif::ContractOp::verifyInvariants ( )

Definition at line 580 of file Ops.cpp.inc.

◆ verifyInvariantsImpl()

llvm::LogicalResult llzk::verif::ContractOp::verifyInvariantsImpl ( )

Definition at line 550 of file Ops.cpp.inc.

◆ verifyRegions()

LogicalResult llzk::verif::ContractOp::verifyRegions ( )

Definition at line 640 of file Ops.cpp.

◆ verifySymbolUses()

LogicalResult llzk::verif::ContractOp::verifySymbolUses ( ::mlir::SymbolTableCollection & symbolTable)

Definition at line 396 of file Ops.cpp.

◆ writeProperties()

void llzk::verif::ContractOp::writeProperties ( ::mlir::DialectBytecodeWriter & writer)

Definition at line 475 of file Ops.cpp.inc.


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