Node NO_HASH implies Node::cmp would never be called in global value numbering

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • 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);
      }

            Assignee:
            Unassigned
            Reporter:
            Yi Yang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: