|
LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
|
#include "llzk-c/Dialect/Poly.h"#include "llzk/CAPI/Builder.h"#include "llzk/CAPI/Support.h"#include "llzk/Dialect/Polymorphic/IR/Dialect.h"#include "llzk/Dialect/Polymorphic/IR/Ops.h"#include "llzk/Dialect/Polymorphic/IR/Types.h"#include "llzk/Dialect/Polymorphic/Transforms/TransformationPasses.h"#include "llzk/Util/Compare.h"#include <mlir-c/Pass.h>#include <mlir/CAPI/AffineExpr.h>#include <mlir/CAPI/AffineMap.h>#include <mlir/CAPI/Pass.h>#include <mlir/CAPI/Registration.h>#include <mlir/CAPI/Wrap.h>#include <mlir/IR/BuiltinAttributes.h>#include <mlir/Support/LLVM.h>#include "llzk/Dialect/Polymorphic/IR/Ops.capi.cpp.inc"#include "llzk/Dialect/Polymorphic/IR/Types.capi.cpp.inc"#include "llzk/Dialect/Polymorphic/Transforms/TransformationPasses.capi.cpp.inc"Go to the source code of this file.
Functions | |
| MlirType | llzkPoly_TypeVarTypeGetFromStringRef (MlirContext ctx, MlirStringRef name) |
| Creates a llzk::polymorphic::TypeVarType. | |
| MlirType | llzkPoly_TypeVarTypeGetFromAttr (MlirAttribute attrWrapper) |
| Creates a llzk::polymorphic::TypeVarType from either a StringAttr or a FlatSymbolRefAttr. | |
| MlirBlock | llzkPoly_TemplateOpGetBody (MlirOperation op) |
| Returns the single body Block within the TemplateOp's Region. | |
| bool | llzkPoly_TemplateOpHasConstParamOps (MlirOperation op) |
| Returns true if the TemplateOp has any TemplateParamOp children. | |
| intptr_t | llzkPoly_TemplateOpNumConstParamOps (MlirOperation op) |
| Returns the number of TemplateParamOp children in the TemplateOp. | |
| void | llzkPoly_TemplateOpGetConstParamNames (MlirOperation op, MlirAttribute *dst) |
| Writes into the destination buffer the names of all TemplateParamOp children as FlatSymbolRefAttr attributes, in definition order. | |
| bool | llzkPoly_TemplateOpHasConstParamNamed (MlirOperation op, MlirStringRef find) |
| Returns true if the TemplateOp has a TemplateParamOp with the given name. | |
| bool | llzkPoly_TemplateOpHasConstExprOps (MlirOperation op) |
| Returns true if the TemplateOp has any TemplateExprOp children. | |
| intptr_t | llzkPoly_TemplateOpNumConstExprOps (MlirOperation op) |
| Returns the number of TemplateExprOp children in the TemplateOp. | |
| void | llzkPoly_TemplateOpGetConstExprNames (MlirOperation op, MlirAttribute *dst) |
| Writes into the destination buffer the names of all TemplateExprOp children as FlatSymbolRefAttr attributes, in definition order. | |
| bool | llzkPoly_TemplateOpHasConstExprNamed (MlirOperation op, MlirStringRef find) |
| Returns true if the TemplateOp has a TemplateExprOp with the given name. | |
| LLZK_DEFINE_OP_BUILD_METHOD (Poly, ApplyMapOp, MlirAttribute map, MlirValueRange mapOperands) | |
| LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD (Poly, ApplyMapOp, WithAffineMap, MlirAffineMap map, MlirValueRange mapOperands) | |
| LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD (Poly, ApplyMapOp, WithAffineExpr, MlirAffineExpr expr, MlirValueRange mapOperands) | |
| intptr_t | llzkPoly_ApplyMapOpGetNumDimOperands (MlirOperation op) |
| Returns the number of operands that correspond to dimensions in the affine map. | |
| void | llzkPoly_ApplyMapOpGetDimOperands (MlirOperation op, MlirValue *dst) |
| Writes into the destination buffer the operands that correspond to dimensions in the affine map. | |
| intptr_t | llzkPoly_ApplyMapOpGetNumSymbolOperands (MlirOperation op) |
| Returns the number of operands that correspond to symbols in the affine map. | |
| void | llzkPoly_ApplyMapOpGetSymbolOperands (MlirOperation op, MlirValue *dst) |
| Writes into the destination buffer the operands that correspond to symbols in the affine map. | |
| LLZK_DEFINE_OP_BUILD_METHOD | ( | Poly | , |
| ApplyMapOp | , | ||
| MlirAttribute | map, | ||
| MlirValueRange | mapOperands ) |
| LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD | ( | Poly | , |
| ApplyMapOp | , | ||
| WithAffineExpr | , | ||
| MlirAffineExpr | expr, | ||
| MlirValueRange | mapOperands ) |
| LLZK_DEFINE_SUFFIX_OP_BUILD_METHOD | ( | Poly | , |
| ApplyMapOp | , | ||
| WithAffineMap | , | ||
| MlirAffineMap | map, | ||
| MlirValueRange | mapOperands ) |
| void llzkPoly_ApplyMapOpGetDimOperands | ( | MlirOperation | op, |
| MlirValue * | dst ) |
Writes into the destination buffer the operands that correspond to dimensions in the affine map.
The buffer needs to be preallocated first with the necessary amount and the caller is responsible of its lifetime. See llzkPoly_ApplyMapOpGetNumDimOperands.
| intptr_t llzkPoly_ApplyMapOpGetNumDimOperands | ( | MlirOperation | op | ) |
| intptr_t llzkPoly_ApplyMapOpGetNumSymbolOperands | ( | MlirOperation | op | ) |
| void llzkPoly_ApplyMapOpGetSymbolOperands | ( | MlirOperation | op, |
| MlirValue * | dst ) |
Writes into the destination buffer the operands that correspond to symbols in the affine map.
The buffer needs to be preallocated first with the necessary amount and the caller is responsible of its lifetime. See llzkPoly_ApplyMapOpGetNumSymbolOperands.
| MlirBlock llzkPoly_TemplateOpGetBody | ( | MlirOperation | op | ) |
| void llzkPoly_TemplateOpGetConstExprNames | ( | MlirOperation | op, |
| MlirAttribute * | dst ) |
Writes into the destination buffer the names of all TemplateExprOp children as FlatSymbolRefAttr attributes, in definition order.
The buffer must be preallocated and the caller is responsible for its lifetime. See llzkPoly_TemplateOpNumConstExprOps.
| void llzkPoly_TemplateOpGetConstParamNames | ( | MlirOperation | op, |
| MlirAttribute * | dst ) |
Writes into the destination buffer the names of all TemplateParamOp children as FlatSymbolRefAttr attributes, in definition order.
The buffer must be preallocated and the caller is responsible for its lifetime. See llzkPoly_TemplateOpNumConstParamOps.
| bool llzkPoly_TemplateOpHasConstExprNamed | ( | MlirOperation | op, |
| MlirStringRef | find ) |
| bool llzkPoly_TemplateOpHasConstExprOps | ( | MlirOperation | op | ) |
| bool llzkPoly_TemplateOpHasConstParamNamed | ( | MlirOperation | op, |
| MlirStringRef | find ) |
| bool llzkPoly_TemplateOpHasConstParamOps | ( | MlirOperation | op | ) |
| intptr_t llzkPoly_TemplateOpNumConstExprOps | ( | MlirOperation | op | ) |
| intptr_t llzkPoly_TemplateOpNumConstParamOps | ( | MlirOperation | op | ) |
| MlirType llzkPoly_TypeVarTypeGetFromAttr | ( | MlirAttribute | attrWrapper | ) |
Creates a llzk::polymorphic::TypeVarType from either a StringAttr or a FlatSymbolRefAttr.
| MlirType llzkPoly_TypeVarTypeGetFromStringRef | ( | MlirContext | ctx, |
| MlirStringRef | name ) |
Creates a llzk::polymorphic::TypeVarType.