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

simplify Node::disconnect_inputs

    XMLWordPrintable

    Details

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

      Description

      Currently, disconnect_inputs supports a little more more than just cutting off inputs.

      // NULL out all inputs to eliminate incoming Def-Use edges.
      // Return the number of edges between 'n' and 'this'
      int Node::disconnect_inputs(Node *n, Compile* C);

      Nobody passes in a node except for NULL. And nobody ever read the return value of this function. By simplifying it, we can make sure this api is single purposed and remove Compile* C as well.

      /skara/jdk/src/hotspot/share/opto$ grep disconnect_inputs -R .
      ./macro.cpp: _fallthroughproj->disconnect_inputs(NULL, C);
      ./macro.cpp: _fallthroughproj->disconnect_inputs(NULL, C);
      ./compile.cpp: mem->disconnect_inputs(NULL, this);
      ./compile.cpp: addp->disconnect_inputs(NULL, this);
      ./compile.cpp: in1->disconnect_inputs(NULL, this);
      ./compile.cpp: n->disconnect_inputs(NULL, this);
      ./compile.cpp: in1->disconnect_inputs(NULL, this);
      ./compile.cpp: in2->disconnect_inputs(NULL, this);
      ./compile.cpp: in1->disconnect_inputs(NULL, this);
      ./compile.cpp: in2->disconnect_inputs(NULL, this);
      ./compile.cpp: m->disconnect_inputs(NULL, this);
      ./compile.cpp: in->disconnect_inputs(NULL, this);
      ./node.hpp: int disconnect_inputs(Node *n, Compile *c);
      ./node.hpp: disconnect_inputs(NULL, c);
      ./stringopts.cpp: uct->disconnect_inputs(NULL, C);
      ./stringopts.cpp: _arguments->disconnect_inputs(NULL, _stringopts->C);
      ./stringopts.cpp: init->disconnect_inputs(NULL, C);
      ./stringopts.cpp: string_sizes->disconnect_inputs(NULL, C);
      ./reg_split.cpp: n->disconnect_inputs(NULL, C);
      ./postaloc.cpp: old->disconnect_inputs(NULL, C);
      ./callGenerator.cpp: map->disconnect_inputs(NULL, C);
      ./lcm.cpp: in->disconnect_inputs(NULL, C);
      ./lcm.cpp: block->get_node(beg)->disconnect_inputs(NULL, C);
      ./lcm.cpp: n->disconnect_inputs(NULL, C);
      ./graphKit.cpp: dead_map->disconnect_inputs(NULL, C); // Mark the map as killed.
      ./graphKit.cpp: call->disconnect_inputs(NULL, C);
      ./ifg.cpp: n->disconnect_inputs(NULL, C);
      ./node.cpp://-------------------------disconnect_inputs-----------------------------------
      ./node.cpp:int Node::disconnect_inputs(Node *n, Compile* C) {

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              xliu Xin Liu
              Reporter:
              xliu Xin Liu
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: