18 #include "mlir/IR/DialectImplementation.h"
19 #include "mlir/Transforms/InliningUtils.h"
21 using namespace circt;
30 struct LLHDInlinerInterface :
public mlir::DialectInlinerInterface {
31 using mlir::DialectInlinerInterface::DialectInlinerInterface;
38 bool isLegalToInline(Operation *, Region *,
bool, IRMapping &)
const final {
42 bool isLegalToInline(Region *, Region *src,
bool, IRMapping &)
const final {
52 void LLHDDialect::initialize() {
58 #include "circt/Dialect/LLHD/IR/LLHD.cpp.inc"
61 addInterfaces<LLHDInlinerInterface>();
64 Operation *LLHDDialect::materializeConstant(OpBuilder &builder, Attribute value,
65 Type type, Location loc) {
66 if (
auto timeAttr = dyn_cast<TimeAttr>(value))
67 return builder.create<llhd::ConstantTimeOp>(loc, type, timeAttr);
69 if (
auto intAttr = dyn_cast<IntegerAttr>(value))
75 #include "circt/Dialect/LLHD/IR/LLHDDialect.cpp.inc"
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.