-
Type:
Enhancement
-
Resolution: Unresolved
-
Priority:
P4
-
Affects Version/s: 21
-
Component/s: hotspot
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);
}