18#ifndef LLZK_C_DIALECT_STRUCT_H
19#define LLZK_C_DIALECT_STRUCT_H
23#include <mlir-c/AffineMap.h>
25#include <mlir-c/Support.h>
57 MlirAttribute name, intptr_t numParams, MlirAttribute
const *params
97MLIR_CAPI_EXPORTED MlirType
111 MlirOperation op, intptr_t *dstSize,
char *(*alloc_string)(
size_t)
121MLIR_CAPI_EXPORTED
void
134MLIR_CAPI_EXPORTED
void
146 Struct, MemberDefOp, MlirStringRef name, MlirType type,
bool isSignal,
bool isColumn
151 Struct, MemberDefOp, WithAttrs, MlirAttribute name, MlirAttribute type,
bool isSignal,
158 Struct, MemberDefOp, WithNamedAttrs, intptr_t numAttrs, MlirNamedAttribute
const *attrs,
159 bool isSignal,
bool isColumn
180 Struct, MemberReadOp, MlirType type, MlirValue component, MlirIdentifier memberName
187 Struct, MemberReadOp, WithAffineMapDistance, MlirType type, MlirValue component,
188 MlirIdentifier memberName, MlirAffineMap affineMap,
MlirValueRange mapOperands
194 Struct, MemberReadOp, WithTemplateSymbolDistance, MlirType type, MlirValue component,
195 MlirIdentifier memberName, MlirStringRef paramName
200 Struct, MemberReadOp, WithLiteralDistance, MlirType type, MlirValue component,
201 MlirIdentifier memberName, int64_t distance
MLIR_CAPI_EXPORTED MlirType llzkStruct_StructTypeGetWithArrayAttr(MlirAttribute name, MlirAttribute params)
Creates a llzk::component::StructType with an ArrayAttr as parameters.
MLIR_CAPI_EXPORTED MlirType llzkStruct_StructTypeGetWithAttrs(MlirAttribute name, intptr_t numParams, MlirAttribute const *params)
Creates a llzk::component::StructType with an array of parameters.
MLIR_CAPI_EXPORTED MlirType llzkStruct_StructDefOpGetTypeWithParams(MlirOperation op, MlirAttribute params)
Returns the associated StructType to this op using the given const params instead of the parameters d...
MLIR_CAPI_EXPORTED void llzkStruct_StructDefOpGetTemplateParamOpNames(MlirOperation op, MlirAttribute *dst)
If this struct.def is within a poly.template, add names of all poly.param within the poly....
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Struct, llzk__component)
Get reference to the LLZK struct dialect.
MLIR_CAPI_EXPORTED bool llzkStruct_MemberDefOpGetSignalValue(MlirOperation op)
Returns whether this member is stored as a witness signal.
MLIR_CAPI_EXPORTED intptr_t llzkStruct_StructDefOpGetNumMemberDefs(MlirOperation op)
Returns the number of MemberDefOp operations defined in this struct.
MLIR_CAPI_EXPORTED MlirLogicalResult llzkStructStructTypeGetDefinition(MlirType type, MlirOperation root, LlzkSymbolLookupResult *result)
Lookups the definition Operation of the given StructType using the given Operation as root for the lo...
MLIR_CAPI_EXPORTED intptr_t llzkStruct_StructDefOpGetNumTemplateExprOpNames(MlirOperation op)
Returns the number of poly.expr operations defined within this template.
MLIR_CAPI_EXPORTED MlirType llzkStruct_StructDefOpGetType(MlirOperation op)
Returns the associated StructType to this op using the const params defined by the op.
MLIR_CAPI_EXPORTED MlirType llzkStruct_StructTypeGet(MlirAttribute name)
Creates a llzk::component::StructType.
MLIR_CAPI_EXPORTED void llzkStruct_StructDefOpGetTemplateExprOpNames(MlirOperation op, MlirAttribute *dst)
If this struct.def is within a poly.template, add names of all poly.expr within the poly....
MLIR_CAPI_EXPORTED intptr_t llzkStruct_StructDefOpGetNumTemplateParamOpNames(MlirOperation op)
Returns the number of poly.param operations defined within this template.
MLIR_CAPI_EXPORTED void llzkStruct_MemberDefOpSetColumnValue(MlirOperation op, bool newValue)
Adds or removes the unit column attribute according to newValue.
MLIR_CAPI_EXPORTED MlirBlock llzkStruct_StructDefOpGetBody(MlirOperation op)
Returns the single body Block within the StructDefOp's Region.
MLIR_CAPI_EXPORTED MlirLogicalResult llzkStructStructTypeGetDefinitionFromModule(MlirType type, MlirModule root, LlzkSymbolLookupResult *result)
Lookups the definition Operation of the given StructType using the given Module as root for the looku...
MLIR_CAPI_EXPORTED void llzkStruct_StructDefOpGetMemberDefs(MlirOperation op, MlirOperation *dst)
Fills the given array with the MemberDefOp operations inside this struct.
MLIR_CAPI_EXPORTED bool llzkStruct_MemberDefOpGetColumnValue(MlirOperation op)
Returns whether this member supports offset table accesses.
MLIR_CAPI_EXPORTED void llzkStruct_MemberDefOpSetSignalValue(MlirOperation op, bool newValue)
Adds or removes the unit signal attribute according to newValue.
MLIR_CAPI_EXPORTED const char * llzkStruct_StructDefOpGetHeaderString(MlirOperation op, intptr_t *dstSize, char *(*alloc_string)(size_t))
Returns the header string of the struct.
#define LLZK_DECLARE_SUFFIX_OP_BUILD_METHOD(dialect, op, suffix,...)
#define LLZK_DECLARE_OP_BUILD_METHOD(dialect, op,...)
Owned result of an LLZK symbol lookup.
Representation of an mlir::ValueRange