LLZK 0.1.0
Veridise's ZK Language IR
|
#include "llzk/CAPI/Builder.h"
#include "llzk/CAPI/Support.h"
#include "llzk/Dialect/Function/IR/Dialect.h"
#include "llzk/Dialect/Function/IR/Ops.h"
#include "llzk-c/Dialect/Function.h"
#include <mlir/CAPI/IR.h>
#include <mlir/CAPI/Pass.h>
#include <mlir/CAPI/Registration.h>
#include <mlir/CAPI/Wrap.h>
#include <mlir/IR/Attributes.h>
#include <mlir/IR/BuiltinAttributes.h>
#include <mlir-c/IR.h>
#include <mlir-c/Pass.h>
#include <llvm/ADT/SmallVectorExtras.h>
Go to the source code of this file.
Functions | |
MlirOperation | llzkFuncDefOpCreateWithAttrsAndArgAttrs (MlirLocation location, MlirStringRef name, MlirType funcType, intptr_t numAttrs, MlirNamedAttribute const *attrs, intptr_t numArgAttrs, MlirAttribute const *argAttrs) |
Creates a FuncDefOp with the given attributes and argument attributes. | |
bool | llzkOperationIsAFuncDefOp (MlirOperation op) |
bool | llzkFuncDefOpGetHasAllowConstraintAttr (MlirOperation op) |
void | llzkFuncDefOpSetAllowConstraintAttr (MlirOperation op, bool value) |
Sets the allow_constraint attribute in the FuncDefOp operation. | |
bool | llzkFuncDefOpGetHasAllowWitnessAttr (MlirOperation op) |
void | llzkFuncDefOpSetAllowWitnessAttr (MlirOperation op, bool value) |
Sets the allow_witness attribute in the FuncDefOp operation. | |
bool | llzkFuncDefOpGetHasArgIsPub (MlirOperation op, unsigned argNo) |
MlirAttribute | llzkFuncDefOpGetFullyQualifiedName (MlirOperation op) |
Returns the fully qualified name of the function. | |
bool | llzkFuncDefOpGetNameIsCompute (MlirOperation op) |
bool | llzkFuncDefOpGetNameIsConstrain (MlirOperation op) |
bool | llzkFuncDefOpGetIsInStruct (MlirOperation op) |
bool | llzkFuncDefOpGetIsStructCompute (MlirOperation op) |
bool | llzkFuncDefOpGetIsStructConstrain (MlirOperation op) |
MlirType | llzkFuncDefOpGetSingleResultTypeOfCompute (MlirOperation op) |
Assuming the function is the compute function returns its StructType result. | |
LLZK_DEFINE_OP_BUILD_METHOD (CallOp, intptr_t numResults, MlirType const *results, MlirAttribute name, intptr_t numOperands, MlirValue const *operands) | |
LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD (CallOp, ToCallee, MlirOperation callee, intptr_t numOperands, MlirValue const *operands) | |
LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD (CallOp, WithMapOperands, intptr_t numResults, MlirType const *results, MlirAttribute name, intptr_t numMapOperands, MlirValueRange const *mapOperands, MlirAttribute numDimsPerMap, intptr_t numArgOperands, MlirValue const *argOperands) | |
LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD (CallOp, WithMapOperandsAndDims, intptr_t numResults, MlirType const *results, MlirAttribute name, intptr_t numMapOperands, MlirValueRange const *mapOperands, intptr_t numDimsPermMapLength, int32_t const *numDimsPerMap, intptr_t numArgOperands, MlirValue const *argOperands) | |
LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD (CallOp, ToCalleeWithMapOperands, MlirOperation callee, intptr_t numMapOperands, MlirValueRange const *mapOperands, MlirAttribute numDimsPerMap, intptr_t numArgOperands, MlirValue const *argOperands) | |
LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD (CallOp, ToCalleeWithMapOperandsAndDims, MlirOperation callee, intptr_t numMapOperands, MlirValueRange const *mapOperands, intptr_t numDimsPermMapLength, int32_t const *numDimsPerMap, intptr_t numArgOperands, MlirValue const *argOperands) | |
bool | llzkOperationIsACallOp (MlirOperation op) |
MlirType | llzkCallOpGetCalleeType (MlirOperation op) |
Returns the FunctionType of the callee. | |
bool | llzkCallOpGetCalleeIsCompute (MlirOperation op) |
bool | llzkCallOpGetCalleeIsConstrain (MlirOperation op) |
bool | llzkCallOpGetCalleeIsStructCompute (MlirOperation op) |
bool | llzkCallOpGetCalleeIsStructConstrain (MlirOperation op) |
MlirType | llzkCallOpGetSingleResultTypeOfCompute (MlirOperation op) |
Assuming the callee is the compute function, returns its StructType result. | |
LLZK_DEFINE_OP_BUILD_METHOD | ( | CallOp | , |
intptr_t | numResults, | ||
MlirType const * | results, | ||
MlirAttribute | name, | ||
intptr_t | numOperands, | ||
MlirValue const * | operands ) |
Definition at line 122 of file Function.cpp.
LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD | ( | CallOp | , |
ToCallee | , | ||
MlirOperation | callee, | ||
intptr_t | numOperands, | ||
MlirValue const * | operands ) |
Definition at line 134 of file Function.cpp.
LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD | ( | CallOp | , |
ToCalleeWithMapOperands | , | ||
MlirOperation | callee, | ||
intptr_t | numMapOperands, | ||
MlirValueRange const * | mapOperands, | ||
MlirAttribute | numDimsPerMap, | ||
intptr_t | numArgOperands, | ||
MlirValue const * | argOperands ) |
Definition at line 174 of file Function.cpp.
LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD | ( | CallOp | , |
ToCalleeWithMapOperandsAndDims | , | ||
MlirOperation | callee, | ||
intptr_t | numMapOperands, | ||
MlirValueRange const * | mapOperands, | ||
intptr_t | numDimsPermMapLength, | ||
int32_t const * | numDimsPerMap, | ||
intptr_t | numArgOperands, | ||
MlirValue const * | argOperands ) |
Definition at line 187 of file Function.cpp.
LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD | ( | CallOp | , |
WithMapOperands | , | ||
intptr_t | numResults, | ||
MlirType const * | results, | ||
MlirAttribute | name, | ||
intptr_t | numMapOperands, | ||
MlirValueRange const * | mapOperands, | ||
MlirAttribute | numDimsPerMap, | ||
intptr_t | numArgOperands, | ||
MlirValue const * | argOperands ) |
Definition at line 143 of file Function.cpp.
LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD | ( | CallOp | , |
WithMapOperandsAndDims | , | ||
intptr_t | numResults, | ||
MlirType const * | results, | ||
MlirAttribute | name, | ||
intptr_t | numMapOperands, | ||
MlirValueRange const * | mapOperands, | ||
intptr_t | numDimsPermMapLength, | ||
int32_t const * | numDimsPerMap, | ||
intptr_t | numArgOperands, | ||
MlirValue const * | argOperands ) |
Definition at line 158 of file Function.cpp.
bool llzkCallOpGetCalleeIsCompute | ( | MlirOperation | op | ) |
Definition at line 207 of file Function.cpp.
bool llzkCallOpGetCalleeIsConstrain | ( | MlirOperation | op | ) |
Definition at line 211 of file Function.cpp.
bool llzkCallOpGetCalleeIsStructCompute | ( | MlirOperation | op | ) |
Definition at line 215 of file Function.cpp.
bool llzkCallOpGetCalleeIsStructConstrain | ( | MlirOperation | op | ) |
Definition at line 219 of file Function.cpp.
MlirType llzkCallOpGetCalleeType | ( | MlirOperation | op | ) |
Returns the FunctionType of the callee.
Definition at line 203 of file Function.cpp.
MlirType llzkCallOpGetSingleResultTypeOfCompute | ( | MlirOperation | op | ) |
Assuming the callee is the compute function, returns its StructType result.
Definition at line 223 of file Function.cpp.
MlirOperation llzkFuncDefOpCreateWithAttrsAndArgAttrs | ( | MlirLocation | location, |
MlirStringRef | name, | ||
MlirType | funcType, | ||
intptr_t | numAttrs, | ||
MlirNamedAttribute const * | attrs, | ||
intptr_t | numArgAttrs, | ||
MlirAttribute const * | argAttrs ) |
Creates a FuncDefOp with the given attributes and argument attributes.
Each argument attribute has to be a DictionaryAttr.
Definition at line 45 of file Function.cpp.
MlirAttribute llzkFuncDefOpGetFullyQualifiedName | ( | MlirOperation | op | ) |
Returns the fully qualified name of the function.
Definition at line 83 of file Function.cpp.
bool llzkFuncDefOpGetHasAllowConstraintAttr | ( | MlirOperation | op | ) |
Definition at line 63 of file Function.cpp.
bool llzkFuncDefOpGetHasAllowWitnessAttr | ( | MlirOperation | op | ) |
Definition at line 71 of file Function.cpp.
bool llzkFuncDefOpGetHasArgIsPub | ( | MlirOperation | op, |
unsigned | argNo ) |
Definition at line 79 of file Function.cpp.
bool llzkFuncDefOpGetIsInStruct | ( | MlirOperation | op | ) |
Definition at line 95 of file Function.cpp.
bool llzkFuncDefOpGetIsStructCompute | ( | MlirOperation | op | ) |
Definition at line 99 of file Function.cpp.
bool llzkFuncDefOpGetIsStructConstrain | ( | MlirOperation | op | ) |
Definition at line 103 of file Function.cpp.
bool llzkFuncDefOpGetNameIsCompute | ( | MlirOperation | op | ) |
Definition at line 87 of file Function.cpp.
bool llzkFuncDefOpGetNameIsConstrain | ( | MlirOperation | op | ) |
Definition at line 91 of file Function.cpp.
MlirType llzkFuncDefOpGetSingleResultTypeOfCompute | ( | MlirOperation | op | ) |
Assuming the function is the compute function returns its StructType result.
Assuming the function is the compute function, returns its StructType result.
Definition at line 108 of file Function.cpp.
void llzkFuncDefOpSetAllowConstraintAttr | ( | MlirOperation | op, |
bool | value ) |
Sets the allow_constraint attribute in the FuncDefOp operation.
Definition at line 67 of file Function.cpp.
void llzkFuncDefOpSetAllowWitnessAttr | ( | MlirOperation | op, |
bool | value ) |
Sets the allow_witness attribute in the FuncDefOp operation.
Definition at line 75 of file Function.cpp.
bool llzkOperationIsACallOp | ( | MlirOperation | op | ) |
Definition at line 201 of file Function.cpp.
bool llzkOperationIsAFuncDefOp | ( | MlirOperation | op | ) |
Definition at line 61 of file Function.cpp.