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