@@ -2217,24 +2217,30 @@ LogicalResult LayerOp::verify() {
2217
2217
// InstanceOp
2218
2218
// ===----------------------------------------------------------------------===//
2219
2219
2220
- void InstanceOp::build (
2221
- OpBuilder &builder, OperationState &result, TypeRange resultTypes,
2222
- StringRef moduleName, StringRef name, NameKindEnum nameKind,
2223
- ArrayRef<Direction> portDirections, ArrayRef<Attribute> portNames,
2224
- ArrayRef<Attribute> annotations, ArrayRef<Attribute> portAnnotations,
2225
- ArrayRef<Attribute> layers, bool lowerToBind, StringAttr innerSym) {
2220
+ void InstanceOp::build (OpBuilder &builder, OperationState &result,
2221
+ TypeRange resultTypes, StringRef moduleName,
2222
+ StringRef name, NameKindEnum nameKind,
2223
+ ArrayRef<Direction> portDirections,
2224
+ ArrayRef<Attribute> portNames,
2225
+ ArrayRef<Attribute> annotations,
2226
+ ArrayRef<Attribute> portAnnotations,
2227
+ ArrayRef<Attribute> layers, bool lowerToBind,
2228
+ bool doNotPrint, StringAttr innerSym) {
2226
2229
build (builder, result, resultTypes, moduleName, name, nameKind,
2227
2230
portDirections, portNames, annotations, portAnnotations, layers,
2228
- lowerToBind,
2231
+ lowerToBind, doNotPrint,
2229
2232
innerSym ? hw::InnerSymAttr::get (innerSym) : hw::InnerSymAttr ());
2230
2233
}
2231
2234
2232
- void InstanceOp::build (
2233
- OpBuilder &builder, OperationState &result, TypeRange resultTypes,
2234
- StringRef moduleName, StringRef name, NameKindEnum nameKind,
2235
- ArrayRef<Direction> portDirections, ArrayRef<Attribute> portNames,
2236
- ArrayRef<Attribute> annotations, ArrayRef<Attribute> portAnnotations,
2237
- ArrayRef<Attribute> layers, bool lowerToBind, hw::InnerSymAttr innerSym) {
2235
+ void InstanceOp::build (OpBuilder &builder, OperationState &result,
2236
+ TypeRange resultTypes, StringRef moduleName,
2237
+ StringRef name, NameKindEnum nameKind,
2238
+ ArrayRef<Direction> portDirections,
2239
+ ArrayRef<Attribute> portNames,
2240
+ ArrayRef<Attribute> annotations,
2241
+ ArrayRef<Attribute> portAnnotations,
2242
+ ArrayRef<Attribute> layers, bool lowerToBind,
2243
+ bool doNotPrint, hw::InnerSymAttr innerSym) {
2238
2244
result.addTypes (resultTypes);
2239
2245
result.getOrAddProperties <Properties>().setModuleName (
2240
2246
SymbolRefAttr::get (builder.getContext (), moduleName));
@@ -2250,6 +2256,9 @@ void InstanceOp::build(
2250
2256
if (lowerToBind)
2251
2257
result.getOrAddProperties <Properties>().setLowerToBind (
2252
2258
builder.getUnitAttr ());
2259
+ if (doNotPrint)
2260
+ result.getOrAddProperties <Properties>().setDoNotPrint (
2261
+ builder.getUnitAttr ());
2253
2262
if (innerSym)
2254
2263
result.getOrAddProperties <Properties>().setInnerSym (innerSym);
2255
2264
@@ -2272,7 +2281,7 @@ void InstanceOp::build(OpBuilder &builder, OperationState &result,
2272
2281
FModuleLike module , StringRef name,
2273
2282
NameKindEnum nameKind, ArrayRef<Attribute> annotations,
2274
2283
ArrayRef<Attribute> portAnnotations, bool lowerToBind,
2275
- hw::InnerSymAttr innerSym) {
2284
+ bool doNotPrint, hw::InnerSymAttr innerSym) {
2276
2285
2277
2286
// Gather the result types.
2278
2287
SmallVector<Type> resultTypes;
@@ -2298,15 +2307,15 @@ void InstanceOp::build(OpBuilder &builder, OperationState &result,
2298
2307
module .getPortDirectionsAttr (), module .getPortNamesAttr (),
2299
2308
builder.getArrayAttr (annotations), portAnnotationsAttr,
2300
2309
module .getLayersAttr (), lowerToBind ? builder.getUnitAttr () : UnitAttr (),
2301
- innerSym);
2310
+ doNotPrint ? builder. getUnitAttr () : UnitAttr (), innerSym);
2302
2311
}
2303
2312
2304
2313
void InstanceOp::build (OpBuilder &builder, OperationState &odsState,
2305
2314
ArrayRef<PortInfo> ports, StringRef moduleName,
2306
2315
StringRef name, NameKindEnum nameKind,
2307
2316
ArrayRef<Attribute> annotations,
2308
2317
ArrayRef<Attribute> layers, bool lowerToBind,
2309
- hw::InnerSymAttr innerSym) {
2318
+ bool doNotPrint, hw::InnerSymAttr innerSym) {
2310
2319
// Gather the result types.
2311
2320
SmallVector<Type> newResultTypes;
2312
2321
SmallVector<Direction> newPortDirections;
@@ -2321,7 +2330,7 @@ void InstanceOp::build(OpBuilder &builder, OperationState &odsState,
2321
2330
2322
2331
return build (builder, odsState, newResultTypes, moduleName, name, nameKind,
2323
2332
newPortDirections, newPortNames, annotations, newPortAnnotations,
2324
- layers, lowerToBind, innerSym);
2333
+ layers, lowerToBind, doNotPrint, innerSym);
2325
2334
}
2326
2335
2327
2336
LogicalResult InstanceOp::verify () {
@@ -2365,7 +2374,8 @@ InstanceOp InstanceOp::erasePorts(OpBuilder &builder,
2365
2374
auto newOp = builder.create <InstanceOp>(
2366
2375
getLoc (), newResultTypes, getModuleName (), getName (), getNameKind (),
2367
2376
newPortDirections, newPortNames, getAnnotations ().getValue (),
2368
- newPortAnnotations, getLayers (), getLowerToBind (), getInnerSymAttr ());
2377
+ newPortAnnotations, getLayers (), getLowerToBind (), getDoNotPrint (),
2378
+ getInnerSymAttr ());
2369
2379
2370
2380
for (unsigned oldIdx = 0 , newIdx = 0 , numOldPorts = getNumResults ();
2371
2381
oldIdx != numOldPorts; ++oldIdx) {
@@ -2438,7 +2448,8 @@ InstanceOp::cloneAndInsertPorts(ArrayRef<std::pair<unsigned, PortInfo>> ports) {
2438
2448
return OpBuilder (*this ).create <InstanceOp>(
2439
2449
getLoc (), newPortTypes, getModuleName (), getName (), getNameKind (),
2440
2450
newPortDirections, newPortNames, getAnnotations ().getValue (),
2441
- newPortAnnos, getLayers (), getLowerToBind (), getInnerSymAttr ());
2451
+ newPortAnnos, getLayers (), getLowerToBind (), getDoNotPrint (),
2452
+ getInnerSymAttr ());
2442
2453
}
2443
2454
2444
2455
LogicalResult InstanceOp::verifySymbolUses (SymbolTableCollection &symbolTable) {
0 commit comments