Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8304037

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

XMLWordPrintable

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

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

              Created:
              Updated: