CIRCT
20.0.0git
|
#include "mlir-c/IR.h"
Go to the source code of this file.
Classes | |
struct | OMEvaluator |
A value type for use in C APIs that just wraps a pointer to an Evaluator. More... | |
struct | OMEvaluatorValue |
A value type for use in C APIs that just wraps a pointer to an Object. More... | |
Typedefs | |
typedef struct OMEvaluator | OMEvaluator |
typedef struct OMEvaluatorValue | OMEvaluatorValue |
Functions | |
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION (OM, om) | |
MLIR_CAPI_EXPORTED bool | omTypeIsAAnyType (MlirType type) |
Is the Type an AnyType. More... | |
MLIR_CAPI_EXPORTED MlirTypeID | omAnyTypeGetTypeID (void) |
Get the TypeID for an AnyType. More... | |
MLIR_CAPI_EXPORTED bool | omTypeIsAClassType (MlirType type) |
Is the Type a ClassType. More... | |
MLIR_CAPI_EXPORTED MlirTypeID | omClassTypeGetTypeID (void) |
Get the TypeID for a ClassType. More... | |
MLIR_CAPI_EXPORTED MlirIdentifier | omClassTypeGetName (MlirType type) |
Get the name for a ClassType. More... | |
MLIR_CAPI_EXPORTED bool | omTypeIsAFrozenBasePathType (MlirType type) |
Is the Type a FrozenBasePathType. More... | |
MLIR_CAPI_EXPORTED MlirTypeID | omFrozenBasePathTypeGetTypeID (void) |
Get the TypeID for a FrozenBasePathType. More... | |
MLIR_CAPI_EXPORTED bool | omTypeIsAFrozenPathType (MlirType type) |
Is the Type a FrozenPathType. More... | |
MLIR_CAPI_EXPORTED MlirTypeID | omFrozenPathTypeGetTypeID (void) |
Get the TypeID for a FrozenPathType. More... | |
MLIR_CAPI_EXPORTED bool | omTypeIsAListType (MlirType type) |
Is the Type a ListType. More... | |
MLIR_CAPI_EXPORTED MlirTypeID | omListTypeGetTypeID (void) |
Get the TypeID for a ListType. More... | |
MLIR_CAPI_EXPORTED MlirType | omListTypeGetElementType (MlirType type) |
MLIR_CAPI_EXPORTED bool | omTypeIsAMapType (MlirType type) |
Is the Type a MapType. More... | |
MLIR_CAPI_EXPORTED MlirType | omMapTypeGetKeyType (MlirType type) |
Return a key type of a map. More... | |
MLIR_CAPI_EXPORTED bool | omTypeIsAStringType (MlirType type) |
Is the Type a StringType. More... | |
MLIR_CAPI_EXPORTED OMEvaluator | omEvaluatorNew (MlirModule mod) |
Construct an Evaluator with an IR module. More... | |
MLIR_CAPI_EXPORTED OMEvaluatorValue | omEvaluatorInstantiate (OMEvaluator evaluator, MlirAttribute className, intptr_t nActualParams, OMEvaluatorValue *actualParams) |
Use the Evaluator to Instantiate an Object from its class name and actual parameters. More... | |
MLIR_CAPI_EXPORTED MlirModule | omEvaluatorGetModule (OMEvaluator evaluator) |
Get the Module the Evaluator is built from. More... | |
MLIR_CAPI_EXPORTED bool | omEvaluatorObjectIsNull (OMEvaluatorValue object) |
Query if the Object is null. More... | |
MLIR_CAPI_EXPORTED MlirType | omEvaluatorObjectGetType (OMEvaluatorValue object) |
Get the Type from an Object, which will be a ClassType. More... | |
MLIR_CAPI_EXPORTED OMEvaluatorValue | omEvaluatorObjectGetField (OMEvaluatorValue object, MlirAttribute name) |
Get a field from an Object, which must contain a field of that name. More... | |
MLIR_CAPI_EXPORTED unsigned | omEvaluatorObjectGetHash (OMEvaluatorValue object) |
Get the object hash. More... | |
MLIR_CAPI_EXPORTED bool | omEvaluatorObjectIsEq (OMEvaluatorValue object, OMEvaluatorValue other) |
Check equality of two objects. More... | |
MLIR_CAPI_EXPORTED MlirAttribute | omEvaluatorObjectGetFieldNames (OMEvaluatorValue object) |
Get all the field names from an Object, can be empty if object has no fields. More... | |
MLIR_CAPI_EXPORTED MlirContext | omEvaluatorValueGetContext (OMEvaluatorValue evaluatorValue) |
MLIR_CAPI_EXPORTED MlirLocation | omEvaluatorValueGetLoc (OMEvaluatorValue evaluatorValue) |
MLIR_CAPI_EXPORTED bool | omEvaluatorValueIsNull (OMEvaluatorValue evaluatorValue) |
MLIR_CAPI_EXPORTED bool | omEvaluatorValueIsAObject (OMEvaluatorValue evaluatorValue) |
Query if the EvaluatorValue is an Object. More... | |
MLIR_CAPI_EXPORTED bool | omEvaluatorValueIsAPrimitive (OMEvaluatorValue evaluatorValue) |
Query if the EvaluatorValue is a Primitive. More... | |
MLIR_CAPI_EXPORTED MlirAttribute | omEvaluatorValueGetPrimitive (OMEvaluatorValue evaluatorValue) |
Get the Primitive from an EvaluatorValue, which must contain a Primitive. More... | |
MLIR_CAPI_EXPORTED OMEvaluatorValue | omEvaluatorValueFromPrimitive (MlirAttribute primitive) |
Get the EvaluatorValue from a Primitive value. More... | |
MLIR_CAPI_EXPORTED bool | omEvaluatorValueIsAList (OMEvaluatorValue evaluatorValue) |
Query if the EvaluatorValue is an Object. More... | |
MLIR_CAPI_EXPORTED intptr_t | omEvaluatorListGetNumElements (OMEvaluatorValue evaluatorValue) |
Get the length of the list. More... | |
MLIR_CAPI_EXPORTED OMEvaluatorValue | omEvaluatorListGetElement (OMEvaluatorValue evaluatorValue, intptr_t pos) |
Get an element of the list. More... | |
MLIR_CAPI_EXPORTED bool | omEvaluatorValueIsATuple (OMEvaluatorValue evaluatorValue) |
Query if the EvaluatorValue is a Tuple. More... | |
MLIR_CAPI_EXPORTED intptr_t | omEvaluatorTupleGetNumElements (OMEvaluatorValue evaluatorValue) |
Get the size of the tuple. More... | |
MLIR_CAPI_EXPORTED OMEvaluatorValue | omEvaluatorTupleGetElement (OMEvaluatorValue evaluatorValue, intptr_t pos) |
Get an element of the tuple. More... | |
MLIR_CAPI_EXPORTED OMEvaluatorValue | omEvaluatorMapGetElement (OMEvaluatorValue evaluatorValue, MlirAttribute attr) |
Get an element of the map. More... | |
MLIR_CAPI_EXPORTED MlirAttribute | omEvaluatorMapGetKeys (OMEvaluatorValue object) |
Get an ArrayAttr with the keys in a Map. More... | |
MLIR_CAPI_EXPORTED bool | omEvaluatorValueIsAMap (OMEvaluatorValue evaluatorValue) |
Query if the EvaluatorValue is a Map. More... | |
MLIR_CAPI_EXPORTED MlirType | omEvaluatorMapGetType (OMEvaluatorValue evaluatorValue) |
Get the Type from a Map, which will be a MapType. More... | |
MLIR_CAPI_EXPORTED bool | omEvaluatorValueIsABasePath (OMEvaluatorValue evaluatorValue) |
Query if the EvaluatorValue is a BasePath. More... | |
MLIR_CAPI_EXPORTED OMEvaluatorValue | omEvaluatorBasePathGetEmpty (MlirContext context) |
Create an empty BasePath. More... | |
MLIR_CAPI_EXPORTED bool | omEvaluatorValueIsAPath (OMEvaluatorValue evaluatorValue) |
Query if the EvaluatorValue is a Path. More... | |
MLIR_CAPI_EXPORTED MlirAttribute | omEvaluatorPathGetAsString (OMEvaluatorValue evaluatorValue) |
Get a string representation of a Path. More... | |
MLIR_CAPI_EXPORTED bool | omEvaluatorValueIsAReference (OMEvaluatorValue evaluatorValue) |
Query if the EvaluatorValue is a Reference. More... | |
MLIR_CAPI_EXPORTED OMEvaluatorValue | omEvaluatorValueGetReferenceValue (OMEvaluatorValue evaluatorValue) |
Dereference a Reference EvaluatorValue. More... | |
MLIR_CAPI_EXPORTED bool | omAttrIsAReferenceAttr (MlirAttribute attr) |
MLIR_CAPI_EXPORTED MlirAttribute | omReferenceAttrGetInnerRef (MlirAttribute attr) |
MLIR_CAPI_EXPORTED bool | omAttrIsAIntegerAttr (MlirAttribute attr) |
MLIR_CAPI_EXPORTED MlirAttribute | omIntegerAttrGetInt (MlirAttribute attr) |
Given an om::IntegerAttr, return the mlir::IntegerAttr. More... | |
MLIR_CAPI_EXPORTED MlirAttribute | omIntegerAttrGet (MlirAttribute attr) |
Get an om::IntegerAttr from mlir::IntegerAttr. More... | |
MLIR_CAPI_EXPORTED MlirStringRef | omIntegerAttrToString (MlirAttribute attr) |
Get a string representation of an om::IntegerAttr. More... | |
MLIR_CAPI_EXPORTED bool | omAttrIsAListAttr (MlirAttribute attr) |
MLIR_CAPI_EXPORTED intptr_t | omListAttrGetNumElements (MlirAttribute attr) |
MLIR_CAPI_EXPORTED MlirAttribute | omListAttrGetElement (MlirAttribute attr, intptr_t pos) |
MLIR_CAPI_EXPORTED bool | omAttrIsAMapAttr (MlirAttribute attr) |
MLIR_CAPI_EXPORTED intptr_t | omMapAttrGetNumElements (MlirAttribute attr) |
MLIR_CAPI_EXPORTED MlirIdentifier | omMapAttrGetElementKey (MlirAttribute attr, intptr_t pos) |
MLIR_CAPI_EXPORTED MlirAttribute | omMapAttrGetElementValue (MlirAttribute attr, intptr_t pos) |
typedef struct OMEvaluator OMEvaluator |
typedef struct OMEvaluatorValue OMEvaluatorValue |
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION | ( | OM | , |
om | |||
) |
MLIR_CAPI_EXPORTED MlirTypeID omAnyTypeGetTypeID | ( | void | ) |
Get the TypeID for an AnyType.
Definition at line 36 of file OM.cpp.
References circt::esi::detail::getTypeID(), and wrap().
MLIR_CAPI_EXPORTED bool omAttrIsAIntegerAttr | ( | MlirAttribute | attr | ) |
MLIR_CAPI_EXPORTED bool omAttrIsAListAttr | ( | MlirAttribute | attr | ) |
MLIR_CAPI_EXPORTED bool omAttrIsAMapAttr | ( | MlirAttribute | attr | ) |
MLIR_CAPI_EXPORTED bool omAttrIsAReferenceAttr | ( | MlirAttribute | attr | ) |
MLIR_CAPI_EXPORTED MlirIdentifier omClassTypeGetName | ( | MlirType | type | ) |
MLIR_CAPI_EXPORTED MlirTypeID omClassTypeGetTypeID | ( | void | ) |
Get the TypeID for a ClassType.
Definition at line 42 of file OM.cpp.
References circt::esi::detail::getTypeID(), and wrap().
MLIR_CAPI_EXPORTED OMEvaluatorValue omEvaluatorBasePathGetEmpty | ( | MlirContext | context | ) |
MLIR_CAPI_EXPORTED MlirModule omEvaluatorGetModule | ( | OMEvaluator | evaluator | ) |
MLIR_CAPI_EXPORTED OMEvaluatorValue omEvaluatorInstantiate | ( | OMEvaluator | evaluator, |
MlirAttribute | className, | ||
intptr_t | nActualParams, | ||
OMEvaluatorValue * | actualParams | ||
) |
Use the Evaluator to Instantiate an Object from its class name and actual parameters.
Definition at line 129 of file OM.cpp.
References circt::om::Evaluator::instantiate(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED OMEvaluatorValue omEvaluatorListGetElement | ( | OMEvaluatorValue | evaluatorValue, |
intptr_t | pos | ||
) |
Get an element of the list.
Get an element of the list.
Definition at line 287 of file OM.cpp.
References circt::calyx::direction::get(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED intptr_t omEvaluatorListGetNumElements | ( | OMEvaluatorValue | evaluatorValue | ) |
Get the length of the list.
Get the length of the list.
Definition at line 280 of file OM.cpp.
References circt::calyx::direction::get(), and unwrap().
MLIR_CAPI_EXPORTED OMEvaluatorValue omEvaluatorMapGetElement | ( | OMEvaluatorValue | evaluatorValue, |
MlirAttribute | attr | ||
) |
Get an element of the map.
Get an element of the map.
Definition at line 313 of file OM.cpp.
References circt::calyx::direction::get(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED MlirAttribute omEvaluatorMapGetKeys | ( | OMEvaluatorValue | object | ) |
Get an ArrayAttr with the keys in a Map.
Definition at line 198 of file OM.cpp.
References circt::calyx::direction::get(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED MlirType omEvaluatorMapGetType | ( | OMEvaluatorValue | evaluatorValue | ) |
Get the Type from a Map, which will be a MapType.
Definition at line 193 of file OM.cpp.
References circt::calyx::direction::get(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED OMEvaluator omEvaluatorNew | ( | MlirModule | mod | ) |
MLIR_CAPI_EXPORTED OMEvaluatorValue omEvaluatorObjectGetField | ( | OMEvaluatorValue | object, |
MlirAttribute | name | ||
) |
Get a field from an Object, which must contain a field of that name.
Definition at line 203 of file OM.cpp.
References circt::calyx::direction::get(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED MlirAttribute omEvaluatorObjectGetFieldNames | ( | OMEvaluatorValue | object | ) |
Get all the field names from an Object, can be empty if object has no fields.
Get all the field names from an Object, can be empty if object has no fields.
Definition at line 189 of file OM.cpp.
References circt::calyx::direction::get(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED unsigned omEvaluatorObjectGetHash | ( | OMEvaluatorValue | object | ) |
Get the object hash.
Get the object hash.
Definition at line 178 of file OM.cpp.
References circt::calyx::direction::get(), circt::esi::hash_value(), and unwrap().
MLIR_CAPI_EXPORTED MlirType omEvaluatorObjectGetType | ( | OMEvaluatorValue | object | ) |
Get the Type from an Object, which will be a ClassType.
Definition at line 173 of file OM.cpp.
References circt::calyx::direction::get(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED bool omEvaluatorObjectIsEq | ( | OMEvaluatorValue | object, |
OMEvaluatorValue | other | ||
) |
Check equality of two objects.
Check equality of two objects.
Definition at line 183 of file OM.cpp.
References circt::calyx::direction::get(), and unwrap().
MLIR_CAPI_EXPORTED bool omEvaluatorObjectIsNull | ( | OMEvaluatorValue | object | ) |
MLIR_CAPI_EXPORTED MlirAttribute omEvaluatorPathGetAsString | ( | OMEvaluatorValue | evaluatorValue | ) |
Get a string representation of a Path.
Definition at line 340 of file OM.cpp.
References circt::calyx::direction::get(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED OMEvaluatorValue omEvaluatorTupleGetElement | ( | OMEvaluatorValue | evaluatorValue, |
intptr_t | pos | ||
) |
Get an element of the tuple.
Get an element of the tuple.
Definition at line 306 of file OM.cpp.
References circt::calyx::direction::get(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED intptr_t omEvaluatorTupleGetNumElements | ( | OMEvaluatorValue | evaluatorValue | ) |
Get the size of the tuple.
Get the size of the tuple.
Definition at line 299 of file OM.cpp.
References circt::calyx::direction::get(), and unwrap().
MLIR_CAPI_EXPORTED OMEvaluatorValue omEvaluatorValueFromPrimitive | ( | MlirAttribute | primitive | ) |
MLIR_CAPI_EXPORTED MlirContext omEvaluatorValueGetContext | ( | OMEvaluatorValue | evaluatorValue | ) |
MLIR_CAPI_EXPORTED MlirLocation omEvaluatorValueGetLoc | ( | OMEvaluatorValue | evaluatorValue | ) |
MLIR_CAPI_EXPORTED MlirAttribute omEvaluatorValueGetPrimitive | ( | OMEvaluatorValue | evaluatorValue | ) |
Get the Primitive from an EvaluatorValue, which must contain a Primitive.
Definition at line 252 of file OM.cpp.
References assert(), circt::calyx::direction::get(), omEvaluatorValueIsAPrimitive(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED OMEvaluatorValue omEvaluatorValueGetReferenceValue | ( | OMEvaluatorValue | evaluatorValue | ) |
Dereference a Reference EvaluatorValue.
Emits an error and returns null if the Reference cannot be dereferenced.
Definition at line 353 of file OM.cpp.
References assert(), circt::calyx::direction::get(), omEvaluatorValueIsAReference(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED bool omEvaluatorValueIsABasePath | ( | OMEvaluatorValue | evaluatorValue | ) |
Query if the EvaluatorValue is a BasePath.
Definition at line 328 of file OM.cpp.
References circt::calyx::direction::get(), and unwrap().
MLIR_CAPI_EXPORTED bool omEvaluatorValueIsAList | ( | OMEvaluatorValue | evaluatorValue | ) |
Query if the EvaluatorValue is an Object.
Query if the EvaluatorValue is an Object.
Definition at line 267 of file OM.cpp.
References circt::calyx::direction::get(), and unwrap().
Referenced by omEvaluatorValueGetList().
MLIR_CAPI_EXPORTED bool omEvaluatorValueIsAMap | ( | OMEvaluatorValue | evaluatorValue | ) |
Query if the EvaluatorValue is a Map.
Query if the EvaluatorValue is a Map.
Definition at line 324 of file OM.cpp.
References circt::calyx::direction::get(), and unwrap().
MLIR_CAPI_EXPORTED bool omEvaluatorValueIsAObject | ( | OMEvaluatorValue | evaluatorValue | ) |
Query if the EvaluatorValue is an Object.
Definition at line 240 of file OM.cpp.
References circt::calyx::direction::get(), and unwrap().
MLIR_CAPI_EXPORTED bool omEvaluatorValueIsAPath | ( | OMEvaluatorValue | evaluatorValue | ) |
Query if the EvaluatorValue is a Path.
Definition at line 336 of file OM.cpp.
References circt::calyx::direction::get(), and unwrap().
MLIR_CAPI_EXPORTED bool omEvaluatorValueIsAPrimitive | ( | OMEvaluatorValue | evaluatorValue | ) |
Query if the EvaluatorValue is a Primitive.
Definition at line 246 of file OM.cpp.
References circt::calyx::direction::get(), and unwrap().
Referenced by omEvaluatorValueGetPrimitive().
MLIR_CAPI_EXPORTED bool omEvaluatorValueIsAReference | ( | OMEvaluatorValue | evaluatorValue | ) |
Query if the EvaluatorValue is a Reference.
Definition at line 346 of file OM.cpp.
References circt::calyx::direction::get(), and unwrap().
Referenced by omEvaluatorValueGetReferenceValue().
MLIR_CAPI_EXPORTED bool omEvaluatorValueIsATuple | ( | OMEvaluatorValue | evaluatorValue | ) |
Query if the EvaluatorValue is a Tuple.
Definition at line 294 of file OM.cpp.
References circt::calyx::direction::get(), and unwrap().
MLIR_CAPI_EXPORTED bool omEvaluatorValueIsNull | ( | OMEvaluatorValue | evaluatorValue | ) |
Definition at line 234 of file OM.cpp.
References OMEvaluatorValue::ptr.
MLIR_CAPI_EXPORTED MlirTypeID omFrozenBasePathTypeGetTypeID | ( | void | ) |
Get the TypeID for a FrozenBasePathType.
Definition at line 55 of file OM.cpp.
References circt::esi::detail::getTypeID(), and wrap().
MLIR_CAPI_EXPORTED MlirTypeID omFrozenPathTypeGetTypeID | ( | void | ) |
Get the TypeID for a FrozenPathType.
Definition at line 65 of file OM.cpp.
References circt::esi::detail::getTypeID(), and wrap().
MLIR_CAPI_EXPORTED MlirAttribute omIntegerAttrGet | ( | MlirAttribute | attr | ) |
Get an om::IntegerAttr from mlir::IntegerAttr.
Definition at line 395 of file OM.cpp.
References circt::calyx::direction::get(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED MlirAttribute omIntegerAttrGetInt | ( | MlirAttribute | attr | ) |
MLIR_CAPI_EXPORTED MlirStringRef omIntegerAttrToString | ( | MlirAttribute | attr | ) |
Get a string representation of an om::IntegerAttr.
Definition at line 402 of file OM.cpp.
References circt::calyx::direction::get(), unwrap(), and wrap().
MLIR_CAPI_EXPORTED MlirAttribute omListAttrGetElement | ( | MlirAttribute | attr, |
intptr_t | pos | ||
) |
MLIR_CAPI_EXPORTED intptr_t omListAttrGetNumElements | ( | MlirAttribute | attr | ) |
MLIR_CAPI_EXPORTED MlirType omListTypeGetElementType | ( | MlirType | type | ) |
MLIR_CAPI_EXPORTED MlirTypeID omListTypeGetTypeID | ( | void | ) |
Get the TypeID for a ListType.
Definition at line 73 of file OM.cpp.
References circt::esi::detail::getTypeID(), and wrap().
MLIR_CAPI_EXPORTED MlirIdentifier omMapAttrGetElementKey | ( | MlirAttribute | attr, |
intptr_t | pos | ||
) |
MLIR_CAPI_EXPORTED MlirAttribute omMapAttrGetElementValue | ( | MlirAttribute | attr, |
intptr_t | pos | ||
) |
MLIR_CAPI_EXPORTED intptr_t omMapAttrGetNumElements | ( | MlirAttribute | attr | ) |
MLIR_CAPI_EXPORTED MlirType omMapTypeGetKeyType | ( | MlirType | type | ) |
MLIR_CAPI_EXPORTED MlirAttribute omReferenceAttrGetInnerRef | ( | MlirAttribute | attr | ) |
MLIR_CAPI_EXPORTED bool omTypeIsAAnyType | ( | MlirType | type | ) |
MLIR_CAPI_EXPORTED bool omTypeIsAClassType | ( | MlirType | type | ) |
MLIR_CAPI_EXPORTED bool omTypeIsAFrozenBasePathType | ( | MlirType | type | ) |
MLIR_CAPI_EXPORTED bool omTypeIsAFrozenPathType | ( | MlirType | type | ) |
MLIR_CAPI_EXPORTED bool omTypeIsAListType | ( | MlirType | type | ) |
MLIR_CAPI_EXPORTED bool omTypeIsAMapType | ( | MlirType | type | ) |
Is the Type a MapType.