14#ifndef MLIR_C_EXTENSIBLEDIALECT_H
15#define MLIR_C_EXTENSIBLEDIALECT_H
28#define DEFINE_C_API_STRUCT(name, storage) \
32 typedef struct name name
38#undef DEFINE_C_API_STRUCT
93 MlirDynamicTypeDefinition typeDef, MlirAttribute *attrs,
intptr_t numAttrs);
130 MlirDynamicAttrDefinition attrDef, MlirAttribute *attrs,
intptr_t numAttrs);
MLIR_CAPI_EXPORTED bool mlirAttributeIsADynamicAttr(MlirAttribute attr)
Check if the given attribute is a dynamic attribute.
MLIR_CAPI_EXPORTED MlirAttribute mlirDynamicAttrGetParam(MlirAttribute attr, intptr_t index)
Get the parameter at the given index in the provided dynamic attribute.
MLIR_CAPI_EXPORTED void mlirDynamicOpTraitDestroy(MlirDynamicOpTrait dynamicOpTrait)
Destroy the dynamic op trait.
MLIR_CAPI_EXPORTED MlirDialect mlirDynamicAttrDefinitionGetDialect(MlirDynamicAttrDefinition attrDef)
Get the dialect that the given dynamic attribute definition belongs to.
MLIR_CAPI_EXPORTED bool mlirTypeIsADynamicType(MlirType type)
Check if the given type is a dynamic type.
MLIR_CAPI_EXPORTED MlirDynamicTypeDefinition mlirDynamicTypeGetTypeDef(MlirType type)
Get the type definition of the given dynamic type.
MLIR_CAPI_EXPORTED MlirDynamicOpTrait mlirDynamicOpTraitIsTerminatorCreate(void)
Get the dynamic op trait that indicates the operation is a terminator.
#define DEFINE_C_API_STRUCT(name, storage)
Opaque type declarations (see mlir-c/IR.h for more details).
MLIR_CAPI_EXPORTED MlirAttribute mlirDynamicAttrGet(MlirDynamicAttrDefinition attrDef, MlirAttribute *attrs, intptr_t numAttrs)
Get a dynamic attribute by instantiating the given attribute definition with the provided attributes.
MLIR_CAPI_EXPORTED bool mlirDialectIsAExtensibleDialect(MlirDialect dialect)
Check if the given dialect is an extensible dialect.
MLIR_CAPI_EXPORTED MlirDynamicAttrDefinition mlirDynamicAttrGetAttrDef(MlirAttribute attr)
Get the attribute definition of the given dynamic attribute.
MLIR_CAPI_EXPORTED MlirDynamicAttrDefinition mlirExtensibleDialectLookupAttrDefinition(MlirDialect dialect, MlirStringRef attrName)
Look up a registered attribute definition by attribute name in the given dialect.
MLIR_CAPI_EXPORTED MlirDialect mlirDynamicTypeDefinitionGetDialect(MlirDynamicTypeDefinition typeDef)
Get the dialect that the given dynamic type definition belongs to.
MLIR_CAPI_EXPORTED intptr_t mlirDynamicTypeGetNumParams(MlirType type)
Get the number of parameters in the given dynamic type.
MLIR_CAPI_EXPORTED MlirTypeID mlirDynamicAttrDefinitionGetTypeID(MlirDynamicAttrDefinition attrDef)
Get the type ID of a dynamic attribute definition.
MLIR_CAPI_EXPORTED MlirType mlirDynamicTypeGet(MlirDynamicTypeDefinition typeDef, MlirAttribute *attrs, intptr_t numAttrs)
Get a dynamic type by instantiating the given type definition with the provided attributes.
MLIR_CAPI_EXPORTED MlirDynamicOpTrait mlirDynamicOpTraitCreate(MlirTypeID typeID, MlirDynamicOpTraitCallbacks callbacks, void *userData)
Create a custom dynamic op trait with the given type ID and callbacks.
MLIR_CAPI_EXPORTED bool mlirDynamicOpTraitAttach(MlirDynamicOpTrait dynamicOpTrait, MlirStringRef opName, MlirContext context)
Attach a dynamic op trait to the given operation name.
MLIR_CAPI_EXPORTED MlirStringRef mlirDynamicAttrDefinitionGetName(MlirDynamicAttrDefinition attrDef)
Get the name of the given dynamic attribute definition.
MLIR_CAPI_EXPORTED MlirDynamicTypeDefinition mlirExtensibleDialectLookupTypeDefinition(MlirDialect dialect, MlirStringRef typeName)
Look up a registered type definition by type name in the given dialect.
MLIR_CAPI_EXPORTED MlirTypeID mlirDynamicTypeDefinitionGetTypeID(MlirDynamicTypeDefinition typeDef)
Get the type ID of a dynamic type definition.
MLIR_CAPI_EXPORTED intptr_t mlirDynamicAttrGetNumParams(MlirAttribute attr)
Get the number of parameters in the given dynamic attribute.
MLIR_CAPI_EXPORTED MlirAttribute mlirDynamicTypeGetParam(MlirType type, intptr_t index)
Get the parameter at the given index in the provided dynamic type.
MLIR_CAPI_EXPORTED MlirStringRef mlirDynamicTypeDefinitionGetName(MlirDynamicTypeDefinition typeDef)
Get the name of the given dynamic type definition.
MLIR_CAPI_EXPORTED MlirDynamicOpTrait mlirDynamicOpTraitNoTerminatorCreate(void)
Get the dynamic op trait that indicates regions have no terminator.
struct MlirLogicalResult MlirLogicalResult
#define MLIR_CAPI_EXPORTED
MlirLogicalResult(* verifyTrait)(MlirOperation op, void *userData)
The callback function to verify the operation.
void(* construct)(void *userData)
Optional constructor for the user data.
void(* destruct)(void *userData)
Optional destructor for the user data.
MlirLogicalResult(* verifyRegionTrait)(MlirOperation op, void *userData)
The callback function to verify the operation with access to regions.
A pointer to a sized fragment of a string, not necessarily null-terminated.