LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
llzk::LLZKCallLikeOpInterface Class Reference
Inheritance diagram for llzk::LLZKCallLikeOpInterface:
[legend]
Collaboration diagram for llzk::LLZKCallLikeOpInterface:
[legend]

Classes

struct  Trait

Public Member Functions

::mlir::Value getSelfValue ()
 Returns the "self" value from the callee (or nullptr if it's not a struct target).
::mlir::FunctionType getTypeSignature ()
 Returns the function signature inferred from this call site.
::mlir::FailureOr<::llzk::UnificationMap > unifyTypeSignatureWithNamespace (::mlir::FunctionType other, ::mlir::ArrayRef<::llvm::StringRef > rhsReversePrefix)
 Unifies this call site's inferred signature with other, resolving paths in other relative to rhsReversePrefix.
::mlir::FailureOr<::llzk::UnificationMap > unifyTypeSignature (::mlir::FunctionType other)
 Unifies this call site's inferred signature with other.
::llvm::SmallVector<::mlir::ValueRange > toVectorOfValueRange (::mlir::OperandRangeRange input)
 Allocates consecutive storage for operand groups so they can be passed to builders as an ArrayRef<ValueRange>.
::mlir::LogicalResult verifyTemplateParamValueCompatibility (::mlir::Attribute paramFromCallOp, ::llzk::polymorphic::TemplateParamOp targetParam)
 Checks a template parameter value against the declared type of its target parameter.
::mlir::LogicalResult verifyTemplateParamValuesCompatibility (::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp > > targetParamDefs)
 Checks each explicit template parameter against its corresponding declared parameter.
::mlir::LogicalResult verifyTemplateParamsMatchInferred (::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp > > targetParamDefs, const ::llzk::UnificationMap &unifications)
 Checks that explicit template parameters agree with their inferred values.
 operator::mlir::ArgAndResultAttrsOpInterface () const
::mlir::ArrayAttr getArgAttrsAttr ()
 Get the array of argument attribute dictionaries.
::mlir::ArrayAttr getResAttrsAttr ()
 Get the array of result attribute dictionaries.
void setArgAttrsAttr (::mlir::ArrayAttr attrs)
 Set the array of argument attribute dictionaries.
void setResAttrsAttr (::mlir::ArrayAttr attrs)
 Set the array of result attribute dictionaries.
::mlir::Attribute removeArgAttrsAttr ()
 Remove the array of argument attribute dictionaries.
::mlir::Attribute removeResAttrsAttr ()
 Remove the array of result attribute dictionaries.
 operator::mlir::CallOpInterface () const
::mlir::CallInterfaceCallable getCallableForCallee ()
 Returns the callee of this call-like operation.
void setCalleeFromCallable (::mlir::CallInterfaceCallable callee)
 Sets the callee of this call-like operation.
::mlir::Operation::operand_range getArgOperands ()
 Returns the operands within this call that are used as arguments to the callee.
::mlir::MutableOperandRange getArgOperandsMutable ()
 Returns the operands within this call that are used as arguments to the callee as a mutable range.
::mlir::Operation * resolveCallableInTable (::mlir::SymbolTableCollection *symbolTable)
 Resolve the callable operation for given callee to a CallableOpInterface, or nullptr if a valid callable was not resolved.
::mlir::Operation * resolveCallable ()
 Resolve the callable operation for given callee to a CallableOpInterface, or nullptr if a valid callable was not resolved.
 operator::mlir::SymbolUserOpInterface () const
::llvm::LogicalResult verifySymbolUses (::mlir::SymbolTableCollection &symbolTable)
 Verify the symbol uses held by this operation.

Detailed Description

Definition at line 89 of file CallLikeOpInterfaces.h.inc.

Member Function Documentation

◆ getArgAttrsAttr()

mlir::ArrayAttr llzk::LLZKCallLikeOpInterface::getArgAttrsAttr ( )

Get the array of argument attribute dictionaries.

The method should return an array attribute containing only dictionary attributes equal in number to the number of arguments. Alternatively, the method can return null to indicate that there are no argument attributes.

Definition at line 64 of file CallLikeOpInterfaces.cpp.inc.

◆ getArgOperands()

mlir::Operation::operand_range llzk::LLZKCallLikeOpInterface::getArgOperands ( )

Returns the operands within this call that are used as arguments to the callee.

Definition at line 119 of file CallLikeOpInterfaces.cpp.inc.

◆ getArgOperandsMutable()

mlir::MutableOperandRange llzk::LLZKCallLikeOpInterface::getArgOperandsMutable ( )

Returns the operands within this call that are used as arguments to the callee as a mutable range.

Definition at line 125 of file CallLikeOpInterfaces.cpp.inc.

◆ getCallableForCallee()

mlir::CallInterfaceCallable llzk::LLZKCallLikeOpInterface::getCallableForCallee ( )

Returns the callee of this call-like operation.

A callee is either a reference to a symbol, via SymbolRefAttr, or a reference to a defined SSA value. If the reference is an SSA value, the SSA value corresponds to a region of a lambda-like operation.

Definition at line 104 of file CallLikeOpInterfaces.cpp.inc.

◆ getResAttrsAttr()

mlir::ArrayAttr llzk::LLZKCallLikeOpInterface::getResAttrsAttr ( )

Get the array of result attribute dictionaries.

The method should return an array attribute containing only dictionary attributes equal in number to the number of results. Alternatively, the method can return null to indicate that there are no result attributes.

Definition at line 72 of file CallLikeOpInterfaces.cpp.inc.

◆ getSelfValue()

mlir::Value llzk::LLZKCallLikeOpInterface::getSelfValue ( )

Returns the "self" value from the callee (or nullptr if it's not a struct target).

Definition at line 11 of file CallLikeOpInterfaces.cpp.inc.

◆ getTypeSignature()

mlir::FunctionType llzk::LLZKCallLikeOpInterface::getTypeSignature ( )

Returns the function signature inferred from this call site.

Definition at line 16 of file CallLikeOpInterfaces.cpp.inc.

◆ operator::mlir::ArgAndResultAttrsOpInterface()

llzk::LLZKCallLikeOpInterface::operator::mlir::ArgAndResultAttrsOpInterface ( ) const
inline

Definition at line 132 of file CallLikeOpInterfaces.h.inc.

◆ operator::mlir::CallOpInterface()

llzk::LLZKCallLikeOpInterface::operator::mlir::CallOpInterface ( ) const
inline

Definition at line 169 of file CallLikeOpInterfaces.h.inc.

◆ operator::mlir::SymbolUserOpInterface()

llzk::LLZKCallLikeOpInterface::operator::mlir::SymbolUserOpInterface ( ) const
inline

Definition at line 209 of file CallLikeOpInterfaces.h.inc.

◆ removeArgAttrsAttr()

mlir::Attribute llzk::LLZKCallLikeOpInterface::removeArgAttrsAttr ( )

Remove the array of argument attribute dictionaries.

This is the same as setting all argument attributes to an empty dictionary. The method should return the removed attribute.

Definition at line 89 of file CallLikeOpInterfaces.cpp.inc.

◆ removeResAttrsAttr()

mlir::Attribute llzk::LLZKCallLikeOpInterface::removeResAttrsAttr ( )

Remove the array of result attribute dictionaries.

This is the same as setting all result attributes to an empty dictionary. The method should return the removed attribute.

Definition at line 96 of file CallLikeOpInterfaces.cpp.inc.

◆ resolveCallable()

mlir::Operation * llzk::LLZKCallLikeOpInterface::resolveCallable ( )

Resolve the callable operation for given callee to a CallableOpInterface, or nullptr if a valid callable was not resolved.

Definition at line 139 of file CallLikeOpInterfaces.cpp.inc.

◆ resolveCallableInTable()

mlir::Operation * llzk::LLZKCallLikeOpInterface::resolveCallableInTable ( ::mlir::SymbolTableCollection * symbolTable)

Resolve the callable operation for given callee to a CallableOpInterface, or nullptr if a valid callable was not resolved.

symbolTable parameter allow for using a cached symbol table for symbol lookups instead of performing an O(N) scan.

Definition at line 133 of file CallLikeOpInterfaces.cpp.inc.

◆ setArgAttrsAttr()

void llzk::LLZKCallLikeOpInterface::setArgAttrsAttr ( ::mlir::ArrayAttr attrs)

Set the array of argument attribute dictionaries.

Definition at line 77 of file CallLikeOpInterfaces.cpp.inc.

◆ setCalleeFromCallable()

void llzk::LLZKCallLikeOpInterface::setCalleeFromCallable ( ::mlir::CallInterfaceCallable callee)

Sets the callee of this call-like operation.

A callee is either a reference to a symbol, via SymbolRefAttr, or a reference to a defined SSA value. The type of the callee is expected to be the same as the return type of getCallableForCallee, e.g., callee should be SymbolRefAttr for func.call.

Definition at line 113 of file CallLikeOpInterfaces.cpp.inc.

◆ setResAttrsAttr()

void llzk::LLZKCallLikeOpInterface::setResAttrsAttr ( ::mlir::ArrayAttr attrs)

Set the array of result attribute dictionaries.

Definition at line 82 of file CallLikeOpInterfaces.cpp.inc.

◆ toVectorOfValueRange()

llvm::SmallVector<::mlir::ValueRange > llzk::LLZKCallLikeOpInterface::toVectorOfValueRange ( ::mlir::OperandRangeRange input)

Allocates consecutive storage for operand groups so they can be passed to builders as an ArrayRef<ValueRange>.

Definition at line 33 of file CallLikeOpInterfaces.cpp.inc.

◆ unifyTypeSignature()

mlir::FailureOr<::llzk::UnificationMap > llzk::LLZKCallLikeOpInterface::unifyTypeSignature ( ::mlir::FunctionType other)

Unifies this call site's inferred signature with other.

Definition at line 27 of file CallLikeOpInterfaces.cpp.inc.

◆ unifyTypeSignatureWithNamespace()

mlir::FailureOr<::llzk::UnificationMap > llzk::LLZKCallLikeOpInterface::unifyTypeSignatureWithNamespace ( ::mlir::FunctionType other,
::mlir::ArrayRef<::llvm::StringRef > rhsReversePrefix )

Unifies this call site's inferred signature with other, resolving paths in other relative to rhsReversePrefix.

Definition at line 22 of file CallLikeOpInterfaces.cpp.inc.

◆ verifySymbolUses()

llvm::LogicalResult llzk::LLZKCallLikeOpInterface::verifySymbolUses ( ::mlir::SymbolTableCollection & symbolTable)

Verify the symbol uses held by this operation.

Definition at line 144 of file CallLikeOpInterfaces.cpp.inc.

◆ verifyTemplateParamsMatchInferred()

mlir::LogicalResult llzk::LLZKCallLikeOpInterface::verifyTemplateParamsMatchInferred ( ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp > > targetParamDefs,
const ::llzk::UnificationMap & unifications )

Checks that explicit template parameters agree with their inferred values.

         Pre-condition assertions:
           - `!isNullOrEmpty(getTemplateParamsAttr())`
           - `getTemplateParamsAttr().size() == llvm::range_size(targetParamDefs)` 

Definition at line 56 of file CallLikeOpInterfaces.cpp.inc.

◆ verifyTemplateParamValueCompatibility()

mlir::LogicalResult llzk::LLZKCallLikeOpInterface::verifyTemplateParamValueCompatibility ( ::mlir::Attribute paramFromCallOp,
::llzk::polymorphic::TemplateParamOp targetParam )

Checks a template parameter value against the declared type of its target parameter.

Definition at line 38 of file CallLikeOpInterfaces.cpp.inc.

◆ verifyTemplateParamValuesCompatibility()

mlir::LogicalResult llzk::LLZKCallLikeOpInterface::verifyTemplateParamValuesCompatibility ( ::llvm::iterator_range<::mlir::Region::op_iterator<::llzk::polymorphic::TemplateParamOp > > targetParamDefs)

Checks each explicit template parameter against its corresponding declared parameter.

         Pre-condition assertions:
           - `!isNullOrEmpty(getTemplateParamsAttr())`
           - `getTemplateParamsAttr().size() == llvm::range_size(targetParamDefs)` 

Definition at line 47 of file CallLikeOpInterfaces.cpp.inc.


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