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

Clean up unused phi-to-copy degradation mechanism

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 16
    • Fix Version/s: 16
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      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

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

                Dates

                Created:
                Updated:
                Resolved: