mirror of
https://github.com/YosysHQ/yosys
synced 2025-09-23 18:01:29 +00:00
Fast path for Const::operator==
This commit is contained in:
parent
b597ad777e
commit
9ad83cc67b
2 changed files with 23 additions and 0 deletions
|
@ -388,6 +388,11 @@ bool RTLIL::Const::operator<(const RTLIL::Const &other) const
|
|||
|
||||
bool RTLIL::Const::operator ==(const RTLIL::Const &other) const
|
||||
{
|
||||
if (is_str() && other.is_str())
|
||||
return get_str() == other.get_str();
|
||||
if (is_bits() && other.is_bits())
|
||||
return get_bits() == other.get_bits();
|
||||
|
||||
if (size() != other.size())
|
||||
return false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue