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) {
// 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) {