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

Clean up unused phi-to-copy degradation mechanism

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 16
    • 16
    • hotspot
    • b18

    Description

      PhiNode::is_copy() performs some assertion checks and then always returns NULL:

        Node* is_copy() const {
          // The node is a real phi if _in[0] is a Region node.
          DEBUG_ONLY(const Node* r = _in[Region];)
          assert(r != NULL && r->is_Region(), "Not valid control");
          return NULL; // not a copy!
        }

      This could be cleaned up and turned into complete debug code.

      An example of such an occurrence in PhiNode::Ideal():
      // The next should never happen after 6297035 fix.
      if( is_copy() ) // Already degraded to a Copy ?
        return NULL; // No change

      Edit: It turns out that phis are not degraded to copies anymore [1], so PhiNode::is_copy() and the rest of code that handles "phi copies" can be simply removed.

      [1] https://github.com/openjdk/jdk/pull/275#issuecomment-696369295

      Attachments

        Issue Links

          Activity

            People

              rcastanedalo Roberto Castaneda Lozano
              chagedorn Christian Hagedorn
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: