3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 09:05:32 +00:00

hashlib: acc -> eat

This commit is contained in:
Emil J. Tywoniak 2024-11-11 15:45:11 +01:00
parent 79acc141d5
commit 4e29ec1854
25 changed files with 200 additions and 200 deletions

View file

@ -47,7 +47,7 @@ struct DftTagWorker {
bool operator<(const tag_set &other) const { return index < other.index; }
bool operator==(const tag_set &other) const { return index == other.index; }
Hasher hash_acc(Hasher h) const { h.acc(index); return h; }
Hasher hash_eat(Hasher h) const { h.eat(index); return h; }
bool empty() const { return index == 0; }
};

View file

@ -52,9 +52,9 @@ struct ExampleDtPass : public Pass
return name == other.name && parameters == other.parameters;
}
Hasher hash_acc(Hasher h) const {
h.acc(name);
h.acc(parameters);
Hasher hash_eat(Hasher h) const {
h.eat(name);
h.eat(parameters);
return h;
}
};

View file

@ -46,11 +46,11 @@ struct EquivStructWorker
parameters == other.parameters && port_sizes == other.port_sizes;
}
Hasher hash_acc(Hasher h) const {
h.acc(type);
h.acc(parameters);
h.acc(port_sizes);
h.acc(connections);
Hasher hash_eat(Hasher h) const {
h.eat(type);
h.eat(parameters);
h.eat(port_sizes);
h.eat(connections);
return h;
}
};

View file

@ -127,10 +127,10 @@ struct proc_dlatch_db_t
return signal == other.signal && match == other.match && children == other.children;
}
Hasher hash_acc(Hasher h) const {
h.acc(signal);
h.acc(match);
h.acc(children);
Hasher hash_eat(Hasher h) const {
h.eat(signal);
h.eat(match);
h.eat(children);
return h;
}
};

View file

@ -46,10 +46,10 @@ struct IdBit {
bool operator==(const IdBit &other) const { return name == other.name && bit == other.bit; };
bool operator!=(const IdBit &other) const { return name != other.name || bit != other.bit; };
Hasher hash_acc(Hasher h) const
Hasher hash_eat(Hasher h) const
{
h.acc(name);
h.acc(bit);
h.eat(name);
h.eat(bit);
return h;
}
@ -64,10 +64,10 @@ struct InvBit {
bool operator==(const InvBit &other) const { return bit == other.bit && inverted == other.inverted; };
bool operator!=(const InvBit &other) const { return bit != other.bit || inverted != other.inverted; };
Hasher hash_acc(Hasher h) const
Hasher hash_eat(Hasher h) const
{
h.acc(bit);
h.acc(inverted);
h.eat(bit);
h.eat(inverted);
return h;
}

View file

@ -233,9 +233,9 @@ struct ClockgatePass : public Pass {
SigBit ce_bit;
bool pol_clk;
bool pol_ce;
Hasher hash_acc(Hasher h) const {
Hasher hash_eat(Hasher h) const {
auto t = std::make_tuple(clk_bit, ce_bit, pol_clk, pol_ce);
h.acc(t);
h.eat(t);
return h;
}
bool operator==(const ClkNetInfo& other) const {

View file

@ -250,10 +250,10 @@ struct FlowGraph
{
return !(*this == other);
}
Hasher hash_acc(Hasher h) const
Hasher hash_eat(Hasher h) const
{
std::pair<RTLIL::SigBit, int> p = {node, is_bottom};
h.acc(p);
h.eat(p);
return h;
}