14 using namespace circt;
17 void SMTDialect::initialize() {
22 #include "circt/Dialect/SMT/SMT.cpp.inc"
26 Operation *SMTDialect::materializeConstant(OpBuilder &builder, Attribute value,
27 Type type, Location loc) {
29 if (
auto bvType = dyn_cast<BitVectorType>(type)) {
30 if (
auto attrValue = dyn_cast<BitVectorAttr>(value)) {
31 assert(bvType == attrValue.getType() &&
32 "attribute and desired result types have to match");
33 return builder.create<BVConstantOp>(loc, attrValue);
38 if (
auto boolType = dyn_cast<BoolType>(type)) {
39 if (
auto attrValue = dyn_cast<BoolAttr>(value))
40 return builder.create<BoolConstantOp>(loc, attrValue);
46 #include "circt/Dialect/SMT/SMTDialect.cpp.inc"
47 #include "circt/Dialect/SMT/SMTEnums.cpp.inc"
assert(baseType &&"element must be base type")
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.