/** * Unlinks a node from all its control flow neighbors and then removes it from its graph. The node * must have no {@linkplain Node#usages() usages}. * * @param node the node to be unlinked and removed */ public void removeFixed(FixedWithNextNode node) { assert node != null; if (node instanceof AbstractBeginNode) { ((AbstractBeginNode) node).prepareDelete(); } assert node.hasNoUsages() : node + " " + node.usages().count() + ", " + node.usages().first(); GraphUtil.unlinkFixedNode(node); node.safeDelete(); }