17#include "mlir/IR/Builders.h"
18#include "mlir/IR/BuiltinTypes.h"
19#include "mlir/IR/DialectImplementation.h"
29 return isa<ClockType>(type);
38void SeqDialect::initialize() {
45#include "circt/Dialect/Seq/Seq.cpp.inc"
48 addInterfaces<SeqProbeTypeDialectInterface>();
58Operation *SeqDialect::materializeConstant(OpBuilder &builder, Attribute value,
59 Type type, Location loc) {
61 if (
auto intType = dyn_cast<IntegerType>(type))
62 if (
auto attrValue = dyn_cast<IntegerAttr>(value))
65 if (isa<ClockType>(type))
66 if (
auto attrValue = dyn_cast<ClockConstAttr>(value))
67 return seq::ConstClockOp::create(builder, loc, attrValue);
72#include "circt/Dialect/Seq/SeqDialect.cpp.inc"
bool isValidProbeElementType(mlir::Type type)
Return true if type is a valid probe payload.
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Interface for dialects to classify their types as valid probe payloads.
ProbeTypeDialectInterface(mlir::Dialect *dialect)