コード例 #1
0
 public boolean continueInlining(StructuredGraph currentGraph) {
   if (currentGraph.getNodeCount() >= MaximumDesiredSize.getValue()) {
     InliningUtil.logInliningDecision("inlining is cut off by MaximumDesiredSize");
     metricInliningStoppedByMaxDesiredSize.increment();
     return false;
   }
   return true;
 }
コード例 #2
0
  private static void deleteNodes(NodeFlood flood, StructuredGraph graph) {
    BiConsumer<Node, Node> consumer =
        (n, input) -> {
          if (input.isAlive() && flood.isMarked(input)) {
            input.removeUsage(n);
          }
        };

    for (Node node : graph.getNodes()) {
      if (!flood.isMarked(node)) {
        node.markDeleted();
        node.acceptInputs(consumer);
        metricNodesRemoved.increment();
      }
    }
  }