13 #include "mlir/CAPI/IR.h"
14 #include "mlir/CAPI/Registration.h"
15 #include "mlir/CAPI/Support.h"
23 return llvm::isa<SVAttributeAttr>(
unwrap(cAttr));
27 MlirStringRef cExpression,
30 mlir::StringAttr expr;
31 if (cExpression.data !=
nullptr)
43 auto expr = llvm::cast<SVAttributeAttr>(
unwrap(cAttr)).getExpression();
45 return wrap(expr.getValue());
50 return llvm::cast<SVAttributeAttr>(
unwrap(attribute))
return wrap(CMemoryType::get(unwrap(ctx), baseType, numElements))
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(CHIRRTL, chirrtl, circt::chirrtl::CHIRRTLDialect) MlirType chirrtlTypeGetCMemory(MlirContext ctx
static void registerPasses()
static EvaluatorValuePtr unwrap(OMEvaluatorValue c)
MlirStringRef svSVAttributeAttrGetName(MlirAttribute cAttr)
bool svAttrIsASVAttributeAttr(MlirAttribute cAttr)
bool svSVAttributeAttrGetEmitAsComment(MlirAttribute attribute)
MlirStringRef svSVAttributeAttrGetExpression(MlirAttribute cAttr)
MlirAttribute svSVAttributeAttrGet(MlirContext cCtxt, MlirStringRef cName, MlirStringRef cExpression, bool emitAsComment)
Direction get(bool isOutput)
Returns an output direction if isOutput is true, otherwise returns an input direction.
StringAttr getName(ArrayAttr names, size_t idx)
Return the name at the specified index of the ArrayAttr or null if it cannot be determined.