Search in sources :

Example 1 with AssertValueNode

use of com.oracle.svm.hosted.nodes.AssertValueNode in project graal by oracle.

the class InliningUtilities method isTrivialMethod.

public static boolean isTrivialMethod(StructuredGraph graph) {
    int numInvokes = 0;
    int numOthers = 0;
    for (Node n : graph.getNodes()) {
        if (n instanceof StartNode || n instanceof ParameterNode || n instanceof FullInfopointNode || n instanceof ValueProxy || n instanceof AssertValueNode) {
            continue;
        }
        if (n instanceof MethodCallTargetNode) {
            numInvokes++;
        } else {
            numOthers++;
        }
        if (!shouldBeTrivial(numInvokes, numOthers, graph)) {
            return false;
        }
    }
    return true;
}
Also used : StartNode(org.graalvm.compiler.nodes.StartNode) FullInfopointNode(org.graalvm.compiler.nodes.FullInfopointNode) ParameterNode(org.graalvm.compiler.nodes.ParameterNode) MethodCallTargetNode(org.graalvm.compiler.nodes.java.MethodCallTargetNode) ValueProxy(org.graalvm.compiler.nodes.spi.ValueProxy) StartNode(org.graalvm.compiler.nodes.StartNode) Node(org.graalvm.compiler.graph.Node) ParameterNode(org.graalvm.compiler.nodes.ParameterNode) MethodCallTargetNode(org.graalvm.compiler.nodes.java.MethodCallTargetNode) FullInfopointNode(org.graalvm.compiler.nodes.FullInfopointNode) AssertValueNode(com.oracle.svm.hosted.nodes.AssertValueNode) AssertValueNode(com.oracle.svm.hosted.nodes.AssertValueNode)

Aggregations

AssertValueNode (com.oracle.svm.hosted.nodes.AssertValueNode)1 Node (org.graalvm.compiler.graph.Node)1 FullInfopointNode (org.graalvm.compiler.nodes.FullInfopointNode)1 ParameterNode (org.graalvm.compiler.nodes.ParameterNode)1 StartNode (org.graalvm.compiler.nodes.StartNode)1 MethodCallTargetNode (org.graalvm.compiler.nodes.java.MethodCallTargetNode)1 ValueProxy (org.graalvm.compiler.nodes.spi.ValueProxy)1