[FIRRTL] Only resolve symbol once per instance

This commit is contained in:
Andrew Lenharth 2021-08-30 15:01:17 -05:00
parent 216e07fdc4
commit e29ecdae62
1 changed files with 2 additions and 2 deletions

View File

@ -168,9 +168,9 @@ public:
void visitDecl(InstanceOp op) {
// Track any instance inputs which need to be connected to for init
// coverage.
auto ref = op.getReferencedModule();
for (auto result : llvm::enumerate(op.results()))
if (op.getReferencedModule().getPortDirection(result.index()) ==
Direction::Output)
if (ref.getPortDirection(result.index()) == Direction::Output)
declareSinks(result.value(), Flow::Source);
else
declareSinks(result.value(), Flow::Sink);