16 #include "mlir/IR/Builders.h"
17 #include "mlir/IR/BuiltinTypes.h"
18 #include "mlir/IR/DialectImplementation.h"
20 using namespace circt;
27 void CombDialect::initialize() {
31 #include "circt/Dialect/Comb/Comb.cpp.inc"
42 Operation *CombDialect::materializeConstant(OpBuilder &builder, Attribute value,
43 Type type, Location loc) {
45 if (
auto intType = dyn_cast<IntegerType>(type))
46 if (
auto attrValue = dyn_cast<IntegerAttr>(value))
50 auto parentOp = builder.getBlock()->getParentOp();
51 auto curModule = dyn_cast<hw::HWModuleOp>(parentOp);
55 return builder.create<hw::ParamValueOp>(loc, type, value);
61 #include "circt/Dialect/Comb/CombEnums.cpp.inc"
63 #include "circt/Dialect/Comb/CombDialect.cpp.inc"
bool isValidParameterExpression(Attribute attr, Operation *module)
Return true if the specified attribute tree is made up of nodes that are valid in a parameter express...
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.