12 #include "mlir/CAPI/IR.h"
13 #include "mlir/CAPI/Registration.h"
14 #include "mlir/CAPI/Support.h"
16 using namespace circt;
34 return isa<PtrType>(
unwrap(type));
49 return wrap(cast<PtrType>(
unwrap(type)).getElementType());
58 return isa<TimeAttr>(
unwrap(attr));
63 uint64_t seconds, uint64_t delta,
71 return wrap(cast<TimeAttr>(
unwrap(attr)).getTimeUnit());
76 return cast<TimeAttr>(
unwrap(attr)).getTime();
81 return cast<TimeAttr>(
unwrap(attr)).getDelta();
86 return cast<TimeAttr>(
unwrap(attr)).getEpsilon();
return wrap(CMemoryType::get(unwrap(ctx), baseType, numElements))
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(CHIRRTL, chirrtl, circt::chirrtl::CHIRRTLDialect) MlirType chirrtlTypeGetCMemory(MlirContext ctx
MlirType llhdPointerTypeGetElementType(MlirType type)
Get the inner type of a pointer.
MlirType llhdTimeTypeGet(MlirContext ctx)
Create a time type.
uint64_t llhdTimeAttrGetSeconds(MlirAttribute attr)
Get the seconds component of a time attribute.
uint64_t llhdTimeAttrGetDelta(MlirAttribute attr)
Get the delta component of a time attribute.
MlirStringRef llhdTimeAttrGetTimeUnit(MlirAttribute attr)
Get the time unit of a time attribute.
bool llhdAttrIsATimeAttr(MlirAttribute attr)
Check if an attribute is a time attribute.
bool llhdTypeIsATimeType(MlirType type)
Check if a type is a time type.
bool llhdTypeIsAPointerType(MlirType type)
Check if a type is a pointer type.
MlirAttribute llhdTimeAttrGet(MlirContext ctx, MlirStringRef timeUnit, uint64_t seconds, uint64_t delta, uint64_t epsilon)
Create a time attribute.
uint64_t llhdTimeAttrGetEpsilon(MlirAttribute attr)
Get the epsilon component of a time attribute.
MlirType llhdPointerTypeGet(MlirType element)
Create a pointer type.
static EvaluatorValuePtr unwrap(OMEvaluatorValue c)
Direction get(bool isOutput)
Returns an output direction if isOutput is true, otherwise returns an input direction.
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.