-
Enhancement
-
Resolution: Unresolved
-
P4
-
21
I find many node have both cmp() and hash() definitions and hash() returns NO_HASH. If I understand correctly, NO_HASH implies that cmp will never be called in global value numbering, we can remove unnecessary cmp().
e.g.
uint FastLockNode::hash() const { return NO_HASH; }
bool FastLockNode::cmp( const Node &n ) const {
return (&n == this);
}
e.g.
uint FastLockNode::hash() const { return NO_HASH; }
bool FastLockNode::cmp( const Node &n ) const {
return (&n == this);
}