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>
56 MlirAttribute name, intptr_t numParams, MlirAttribute
const *params
96MLIR_CAPI_EXPORTED MlirType
110 MlirOperation op, intptr_t *dstSize,
char *(*alloc_string)(
size_t)
120MLIR_CAPI_EXPORTED
void
133MLIR_CAPI_EXPORTED
void
145 Struct, MemberReadOp, MlirType type, MlirValue component, MlirIdentifier memberName
152 Struct, MemberReadOp, WithAffineMapDistance, MlirType type, MlirValue component,
153 MlirIdentifier memberName, MlirAffineMap affineMap,
MlirValueRange mapOperands
159 Struct, MemberReadOp, WithTemplateSymbolDistance, MlirType type, MlirValue component,
160 MlirIdentifier memberName, MlirStringRef paramName
165 Struct, MemberReadOp, WithLiteralDistance, MlirType type, MlirValue component,
166 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 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 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 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