3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-24 10:21:29 +00:00

Optimize Const::hash_into to hash packed bits efficiently

This commit is contained in:
Robert O'Callahan 2025-08-29 03:48:16 +00:00
parent 1a367b907c
commit 67a274ed1f
3 changed files with 47 additions and 6 deletions

View file

@ -1052,12 +1052,7 @@ public:
resize(width, empty() ? RTLIL::State::Sx : back());
}
[[nodiscard]] Hasher hash_into(Hasher h) const {
h.eat(size());
for (auto b : *this)
h.eat(b);
return h;
}
[[nodiscard]] Hasher hash_into(Hasher h) const;
};
struct RTLIL::AttrObject