17#include "mlir/IR/Builders.h"
18#include "mlir/IR/BuiltinTypes.h"
19#include "mlir/IR/DialectImplementation.h"
28void SimDialect::initialize() { registerTypes(); }
30#include "circt/Dialect/Sim/SimDialect.cpp.inc"
32Operation *SimDialect::materializeConstant(::mlir::OpBuilder &builder,
33 ::mlir::Attribute value,
35 ::mlir::Location loc) {
37 if (
auto fmtStrType = llvm::dyn_cast<FormatStringType>(type))
38 return FormatLiteralOp::create(builder, loc, fmtStrType,
39 llvm::cast<StringAttr>(value));
40 if (
auto dynStrType = llvm::dyn_cast<DynamicStringType>(type))
41 return StringConstantOp::create(builder, loc, dynStrType,
42 llvm::cast<StringAttr>(value));
43 if (
auto intAttr = dyn_cast<IntegerAttr>(value))
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.