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

Add new Node* Node::find_out(int opc) method

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b49
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        We have a lot places which search for particular user node:

            Node* xorx = NULL;
            for (DUIterator_Fast imax, i = p2x->fast_outs(imax); i < imax; i++) {
              Node* u = p2x->fast_out(i);
              if (u->Opcode() == Op_XorX) {
                xorx = u;
                break;
              }
            }

              for (DUIterator_Fast imax, i = n->fast_outs(imax); i < imax; i++) {
                Node *use = n->fast_out(i);
                if (use->Opcode() == Op_SCMemProj) {
                  n = use;
                  break;
                }
              }

        bool LoadStoreNode::result_not_used() const {
          for( DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++ ) {
            Node *x = fast_out(i);
            if (x->Opcode() == Op_SCMemProj) continue;
            return false;
          }
          return true;
        }

              uint cnt = def->outcnt();
              for (uint i = 0; i < cnt; i++) {
                Node* proj = def->raw_out(i);
                if (proj->Opcode() == Op_SCMemProj) {
                  return false;
                }
              }


        and so on.

        Add new Node* Node::find_user(int opc) method to be used in such cases.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  zmajo Zoltan Majo (Inactive)
                  Reporter:
                  kvn Vladimir Kozlov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: