|
LLZK 0.1.0
An open-source IR for Zero Knowledge (ZK) circuits
|
Go to the source code of this file.
Classes | |
| struct | MlirValueRange |
| struct | LlzkSymbolLookupResult |
| struct | LlzkAffineMapOperandsBuilder |
| Encapsulates the arguments related to affine maps that are common in operation constructors that support them. More... | |
Macros | |
| #define | LLZK_BUILD_METHOD_NAME(op, suffix) |
| #define | LLZK_DECLARE_SUFFIX_OP_BUILD_METHOD(op, suffix, ...) |
| #define | LLZK_DECLARE_OP_BUILD_METHOD(op, ...) |
| #define | LLZK_DECLARE_PREDICATE(name, ...) |
| #define | LLZK_DECLARE_OP_PREDICATE(op, name) |
| #define | LLZK_DECLARE_NARY_OP_PREDICATE(op, name, ...) |
| #define | LLZK_DECLARE_ISA(what, root) |
| #define | LLZK_DECLARE_TYPE_ISA(what) |
| #define | LLZK_DECLARE_OP_ISA(what) |
| #define | LLZK_DECLARE_ATTR_ISA(what) |
Typedefs | |
| typedef struct MlirValueRange | MlirValueRange |
| typedef struct LlzkSymbolLookupResult | LlzkSymbolLookupResult |
| typedef struct LlzkAffineMapOperandsBuilder | LlzkAffineMapOperandsBuilder |
| Encapsulates the arguments related to affine maps that are common in operation constructors that support them. | |
Functions | |
| MLIR_CAPI_EXPORTED void | llzkSymbolLookupResultDestroy (LlzkSymbolLookupResult result) |
| Destroys the lookup result, releasing its resources. | |
| MLIR_CAPI_EXPORTED MlirOperation | LlzkSymbolLookupResultGetOperation (LlzkSymbolLookupResult result) |
| Returns the looked up Operation. | |
| MLIR_CAPI_EXPORTED void | mlirOperationReplaceUsesOfWith (MlirOperation op, MlirValue of, MlirValue with) |
| Replace uses of 'of' value with the 'with' value inside the 'op' operation. | |
| MLIR_CAPI_EXPORTED void | mlirOperationWalkReverse (MlirOperation from, MlirOperationWalkCallback callback, void *userData, MlirWalkOrder walkOrder) |
| Walks operation op in walkOrder, with operations at the same nesting level traversed in reverse order, and calls callback on that operation. | |
| MLIR_CAPI_EXPORTED LlzkAffineMapOperandsBuilder | llzkAffineMapOperandsBuilderCreate (void) |
| Creates a new struct. The owner is responsible for cleaning the struct. | |
| MLIR_CAPI_EXPORTED void | llzkAffineMapOperandsBuilderDestroy (LlzkAffineMapOperandsBuilder *builder) |
| Destroys the struct releasing its resources. | |
| MLIR_CAPI_EXPORTED void | llzkAffineMapOperandsBuilderAppendOperands (LlzkAffineMapOperandsBuilder *builder, intptr_t n, MlirValueRange const *mapOperands) |
| Appends the value ranges to the list of map operands. | |
| MLIR_CAPI_EXPORTED void | llzkAffineMapOperandsBuilderAppendOperandsWithDimCount (LlzkAffineMapOperandsBuilder *builder, intptr_t n, MlirValueRange const *mapOperands, int32_t const *dimsPerMap) |
| Appends the value ranges to the list of map operands and indicates how many of these operands are dimensions. | |
| MLIR_CAPI_EXPORTED void | llzkAffineMapOperandsBuilderAppendDimCount (LlzkAffineMapOperandsBuilder *builder, intptr_t n, int32_t const *dimsPerMap) |
| Appends a dimension count to the list of dimensions per map. | |
| MLIR_CAPI_EXPORTED void | llzkAffineMapOperandsBuilderSetDimsPerMapFromAttr (LlzkAffineMapOperandsBuilder *builder, MlirAttribute attribute) |
| Sets the number of dimensions per map to the given attribute. | |
| MLIR_CAPI_EXPORTED void | llzkAffineMapOperandsBuilderConvertDimsPerMapToArray (LlzkAffineMapOperandsBuilder *builder) |
| Converts the list of dimensions defined as an attribute into an array. | |
| MLIR_CAPI_EXPORTED void | llzkAffineMapOperandsBuilderConvertDimsPerMapToAttr (LlzkAffineMapOperandsBuilder *builder, MlirContext context) |
| Converts the list of dimensions defined as an array into an attribute. | |
| MLIR_CAPI_EXPORTED MlirAttribute | llzkAffineMapOperandsBuilderGetDimsPerMapAttr (LlzkAffineMapOperandsBuilder builder, MlirContext context) |
| Returns the number of dimensions per map represented as an attribute. | |
| #define LLZK_BUILD_METHOD_NAME | ( | op, | |
| suffix ) |
| #define LLZK_DECLARE_ATTR_ISA | ( | what | ) |
| #define LLZK_DECLARE_ISA | ( | what, | |
| root ) |
| #define LLZK_DECLARE_NARY_OP_PREDICATE | ( | op, | |
| name, | |||
| ... ) |
| #define LLZK_DECLARE_OP_BUILD_METHOD | ( | op, | |
| ... ) |
| #define LLZK_DECLARE_OP_ISA | ( | what | ) |
| #define LLZK_DECLARE_OP_PREDICATE | ( | op, | |
| name ) |
| #define LLZK_DECLARE_PREDICATE | ( | name, | |
| ... ) |
| #define LLZK_DECLARE_SUFFIX_OP_BUILD_METHOD | ( | op, | |
| suffix, | |||
| ... ) |
| #define LLZK_DECLARE_TYPE_ISA | ( | what | ) |
| typedef struct LlzkAffineMapOperandsBuilder LlzkAffineMapOperandsBuilder |
Encapsulates the arguments related to affine maps that are common in operation constructors that support them.
| typedef struct LlzkSymbolLookupResult LlzkSymbolLookupResult |
| MLIR_CAPI_EXPORTED void llzkAffineMapOperandsBuilderAppendDimCount | ( | LlzkAffineMapOperandsBuilder * | builder, |
| intptr_t | n, | ||
| int32_t const * | dimsPerMap ) |
Appends a dimension count to the list of dimensions per map.
If the builder is in Attr mode allocates an array with enough space and copies the attr's contents into it before appending the new value.
Definition at line 151 of file Support.cpp.
| MLIR_CAPI_EXPORTED void llzkAffineMapOperandsBuilderAppendOperands | ( | LlzkAffineMapOperandsBuilder * | builder, |
| intptr_t | n, | ||
| MlirValueRange const * | mapOperands ) |
Appends the value ranges to the list of map operands.
Definition at line 135 of file Support.cpp.
| MLIR_CAPI_EXPORTED void llzkAffineMapOperandsBuilderAppendOperandsWithDimCount | ( | LlzkAffineMapOperandsBuilder * | builder, |
| intptr_t | n, | ||
| MlirValueRange const * | mapOperands, | ||
| int32_t const * | dimsPerMap ) |
Appends the value ranges to the list of map operands and indicates how many of these operands are dimensions.
Asserts that the number of map operands and the number of dimensions per map is the same to avoid going out of sync.
Definition at line 141 of file Support.cpp.
| MLIR_CAPI_EXPORTED void llzkAffineMapOperandsBuilderConvertDimsPerMapToArray | ( | LlzkAffineMapOperandsBuilder * | builder | ) |
Converts the list of dimensions defined as an attribute into an array.
This function is a no-op if the list was already in array mode.
Definition at line 167 of file Support.cpp.
| MLIR_CAPI_EXPORTED void llzkAffineMapOperandsBuilderConvertDimsPerMapToAttr | ( | LlzkAffineMapOperandsBuilder * | builder, |
| MlirContext | context ) |
Converts the list of dimensions defined as an array into an attribute.
This function is a no-op if the list was already in attribute mode.
Definition at line 178 of file Support.cpp.
| MLIR_CAPI_EXPORTED LlzkAffineMapOperandsBuilder llzkAffineMapOperandsBuilderCreate | ( | void | ) |
Creates a new struct. The owner is responsible for cleaning the struct.
Definition at line 113 of file Support.cpp.
| MLIR_CAPI_EXPORTED void llzkAffineMapOperandsBuilderDestroy | ( | LlzkAffineMapOperandsBuilder * | builder | ) |
Destroys the struct releasing its resources.
Definition at line 123 of file Support.cpp.
| MLIR_CAPI_EXPORTED MlirAttribute llzkAffineMapOperandsBuilderGetDimsPerMapAttr | ( | LlzkAffineMapOperandsBuilder | builder, |
| MlirContext | context ) |
Returns the number of dimensions per map represented as an attribute.
Definition at line 186 of file Support.cpp.
| MLIR_CAPI_EXPORTED void llzkAffineMapOperandsBuilderSetDimsPerMapFromAttr | ( | LlzkAffineMapOperandsBuilder * | builder, |
| MlirAttribute | attribute ) |
Sets the number of dimensions per map to the given attribute.
Overwrites the previous values and deallocates if necessary.
Asserts that the attribute is of type DenseI32ArrayAttr.
Definition at line 158 of file Support.cpp.
| MLIR_CAPI_EXPORTED void llzkSymbolLookupResultDestroy | ( | LlzkSymbolLookupResult | result | ) |
Destroys the lookup result, releasing its resources.
Definition at line 30 of file Support.cpp.
| MLIR_CAPI_EXPORTED MlirOperation LlzkSymbolLookupResultGetOperation | ( | LlzkSymbolLookupResult | wrapped | ) |
Returns the looked up Operation.
The lifetime of the Operation is tied to the lifetime of the lookup result.
Definition at line 37 of file Support.cpp.
| MLIR_CAPI_EXPORTED void mlirOperationReplaceUsesOfWith | ( | MlirOperation | op, |
| MlirValue | oldValue, | ||
| MlirValue | newValue ) |
Replace uses of 'of' value with the 'with' value inside the 'op' operation.
Note: Duplicated from upstream LLVM. Available in 21.1.8 and later.
Replace uses of 'of' value with the 'with' value inside the 'op' operation.
Definition at line 43 of file Support.cpp.
| MLIR_CAPI_EXPORTED void mlirOperationWalkReverse | ( | MlirOperation | from, |
| MlirOperationWalkCallback | callback, | ||
| void * | userData, | ||
| MlirWalkOrder | walkOrder ) |
Walks operation op in walkOrder, with operations at the same nesting level traversed in reverse order, and calls callback on that operation.
*userData is passed to the callback as well and can be used to tunnel some context or other data into the callback.
Definition at line 62 of file Support.cpp.