mirror of https://github.com/llvm/circt.git
[FIRRTL] Use cached circuit symbol table for option group lookup.
Now that we've added a cached symbol table at the circuit level, we can use that to look up option groups as well. This didn't have a major performance improvement on some large designs, but in the presence of more instance choices, this could help. Regardless, this is one minor piece to clean up for #6772.
This commit is contained in:
parent
8b9e87dc7f
commit
c6325d287c
|
@ -3883,10 +3883,7 @@ ParseResult FIRStmtParser::parseInstanceChoice() {
|
|||
SmallVector<PortInfo> modulePorts = defaultModule.getPorts();
|
||||
|
||||
// Find the option group.
|
||||
auto circuit =
|
||||
builder.getBlock()->getParentOp()->getParentOfType<CircuitOp>();
|
||||
auto optionGroup =
|
||||
dyn_cast_or_null<OptionOp>(circuit.lookupSymbol(optionGroupName));
|
||||
auto optionGroup = circuitSymTbl.lookup<OptionOp>(optionGroupName);
|
||||
if (!optionGroup)
|
||||
return emitError(loc,
|
||||
"use of undefined option group '" + optionGroupName + "'");
|
||||
|
|
Loading…
Reference in New Issue