src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ImplicitNullCheckTest.java
changeset 58877 aec7bf35d6f5
parent 58299 6df94ce3ab2f
equal deleted inserted replaced
58876:1a8d65e71a66 58877:aec7bf35d6f5
    32 import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
    32 import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
    33 import org.graalvm.compiler.nodes.memory.ReadNode;
    33 import org.graalvm.compiler.nodes.memory.ReadNode;
    34 import org.graalvm.compiler.nodes.spi.CoreProviders;
    34 import org.graalvm.compiler.nodes.spi.CoreProviders;
    35 import org.graalvm.compiler.nodes.spi.LoweringTool;
    35 import org.graalvm.compiler.nodes.spi.LoweringTool;
    36 import org.graalvm.compiler.phases.OptimisticOptimizations;
    36 import org.graalvm.compiler.phases.OptimisticOptimizations;
    37 import org.graalvm.compiler.phases.common.CanonicalizerPhase;
       
    38 import org.graalvm.compiler.phases.common.FloatingReadPhase;
    37 import org.graalvm.compiler.phases.common.FloatingReadPhase;
    39 import org.graalvm.compiler.phases.common.GuardLoweringPhase;
    38 import org.graalvm.compiler.phases.common.GuardLoweringPhase;
    40 import org.graalvm.compiler.phases.common.LoweringPhase;
    39 import org.graalvm.compiler.phases.common.LoweringPhase;
    41 import org.graalvm.compiler.phases.tiers.MidTierContext;
    40 import org.graalvm.compiler.phases.tiers.MidTierContext;
    42 import org.junit.Assert;
    41 import org.junit.Assert;
    70     private void test(final String snippet) {
    69     private void test(final String snippet) {
    71         DebugContext debug = getDebugContext();
    70         DebugContext debug = getDebugContext();
    72         try (DebugContext.Scope s = debug.scope("FloatingReadTest", new DebugDumpScope(snippet))) {
    71         try (DebugContext.Scope s = debug.scope("FloatingReadTest", new DebugDumpScope(snippet))) {
    73             StructuredGraph graph = parseEager(snippet, AllowAssumptions.YES, debug);
    72             StructuredGraph graph = parseEager(snippet, AllowAssumptions.YES, debug);
    74             CoreProviders context = getProviders();
    73             CoreProviders context = getProviders();
    75             new LoweringPhase(new CanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
    74             new LoweringPhase(createCanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
    76             new FloatingReadPhase().apply(graph);
    75             new FloatingReadPhase().apply(graph);
    77             MidTierContext midTierContext = new MidTierContext(getProviders(), getTargetProvider(), OptimisticOptimizations.ALL, graph.getProfilingInfo());
    76             MidTierContext midTierContext = new MidTierContext(getProviders(), getTargetProvider(), OptimisticOptimizations.ALL, graph.getProfilingInfo());
    78             new GuardLoweringPhase().apply(graph, midTierContext);
    77             new GuardLoweringPhase().apply(graph, midTierContext);
    79 
    78 
    80             Assert.assertEquals(0, graph.getNodes(DeoptimizeNode.TYPE).count());
    79             Assert.assertEquals(0, graph.getNodes(DeoptimizeNode.TYPE).count());