mirror of
https://github.com/YosysHQ/yosys
synced 2026-07-25 00:22:34 +00:00
twine: avoid TwinePool::lookup
This commit is contained in:
parent
4061593ce5
commit
3a5f5c77bf
23 changed files with 277 additions and 259 deletions
|
|
@ -375,7 +375,10 @@ struct RTLILFrontendWorker {
|
|||
// We don't need to addref/release in this case.
|
||||
std::optional<RTLIL::IdString> id = try_parse_id();
|
||||
if (id.has_value()) {
|
||||
RTLIL::Wire *wire = current_module->wire(design->twines.lookup(id->str()));
|
||||
std::string s = id->str();
|
||||
bool pub = !s.empty() && s[0] == '\\';
|
||||
TwineRef ref = twine_tag(design->twines.find(Twine{pub ? s.substr(1) : s}), pub);
|
||||
RTLIL::Wire *wire = current_module->wire(ref);
|
||||
if (wire == nullptr) {
|
||||
if (flag_legalize)
|
||||
wire = legalize_wire(*id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue