コード例 #1
0
 /**
  * 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();
 }
コード例 #2
0
ファイル: GraphUtil.java プロジェクト: smarr/graal
 public static void removeFixedWithUnusedInputs(FixedWithNextNode fixed) {
   if (fixed instanceof StateSplit) {
     FrameState stateAfter = ((StateSplit) fixed).stateAfter();
     ((StateSplit) fixed).setStateAfter(null);
     if (stateAfter.usages().isEmpty()) {
       killWithUnusedFloatingInputs(stateAfter);
     }
   }
   unlinkFixedNode(fixed);
   killWithUnusedFloatingInputs(fixed);
 }
コード例 #3
0
 public void replaceFixedWithFloating(FixedWithNextNode node, FloatingNode replacement) {
   assert node != null && replacement != null && node.isAlive() && replacement.isAlive()
       : "cannot replace " + node + " with " + replacement;
   GraphUtil.unlinkFixedNode(node);
   node.replaceAtUsagesAndDelete(replacement);
 }