[FIRRTL] Remove unused builder for InstanceOp (#1976)

This builder was not used anywhere, so it makes sense to remove it.  It
was originally introduced in 9c8935462b.
This commit is contained in:
Andrew Young 2021-10-12 09:57:08 -07:00 committed by GitHub
parent c20b50dbee
commit f2f7229c24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 21 deletions

View File

@ -35,12 +35,7 @@ def InstanceOp : FIRRTLOp<"instance", [
CArg<"StringRef", "{}">:$name,
CArg<"ArrayRef<Attribute>", "{}">:$annotations,
CArg<"ArrayRef<Attribute>", "{}">:$portAnnotations,
CArg<"bool","false">:$lowerToBind)>,
/// Constructor that creates a version of the specified instance, but that
/// erases some number of results from it.
OpBuilder<(ins "InstanceOp":$existingInstance,
"::mlir::ArrayRef<unsigned>":$resultsToErase)>
CArg<"bool","false">:$lowerToBind)>
];
let extraClassDeclaration = [{

View File

@ -844,21 +844,6 @@ void InstanceOp::build(OpBuilder &builder, OperationState &result,
}
}
/// Create a copy of the specified instance operation with some result removed.
void InstanceOp::build(OpBuilder &builder, OperationState &result,
InstanceOp existingInstance,
ArrayRef<unsigned> resultsToErase) {
// Drop the direction markers for dead ports.
auto resultTypes = SmallVector<Type>(existingInstance.getResultTypes());
SmallVector<Type> newResultTypes =
removeElementsAtIndices<Type>(resultTypes, resultsToErase);
build(builder, result, newResultTypes, existingInstance->getOperands(),
existingInstance->getAttrs());
}
ArrayAttr InstanceOp::getPortAnnotation(unsigned portIdx) {
assert(portIdx < getNumResults() &&
"index should be smaller than result number");