src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ea/PEAReadEliminationTest.java
changeset 58877 aec7bf35d6f5
parent 52910 583fd71c47d6
equal deleted inserted replaced
58876:1a8d65e71a66 58877:aec7bf35d6f5
     1 /*
     1 /*
     2  * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    28 import org.graalvm.compiler.nodes.StructuredGraph;
    28 import org.graalvm.compiler.nodes.StructuredGraph;
    29 import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
    29 import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions;
    30 import org.graalvm.compiler.nodes.extended.RawLoadNode;
    30 import org.graalvm.compiler.nodes.extended.RawLoadNode;
    31 import org.graalvm.compiler.nodes.java.LoadIndexedNode;
    31 import org.graalvm.compiler.nodes.java.LoadIndexedNode;
    32 import org.graalvm.compiler.nodes.java.StoreIndexedNode;
    32 import org.graalvm.compiler.nodes.java.StoreIndexedNode;
    33 import org.graalvm.compiler.phases.common.CanonicalizerPhase;
       
    34 import org.graalvm.compiler.phases.tiers.HighTierContext;
    33 import org.graalvm.compiler.phases.tiers.HighTierContext;
    35 import org.graalvm.compiler.virtual.phases.ea.PartialEscapePhase;
    34 import org.graalvm.compiler.virtual.phases.ea.PartialEscapePhase;
    36 import org.junit.Test;
    35 import org.junit.Test;
    37 
    36 
    38 import sun.misc.Unsafe;
    37 import sun.misc.Unsafe;
   179 
   178 
   180     protected StructuredGraph processMethod(final String snippet) {
   179     protected StructuredGraph processMethod(final String snippet) {
   181         StructuredGraph graph = parseEager(snippet, AllowAssumptions.NO);
   180         StructuredGraph graph = parseEager(snippet, AllowAssumptions.NO);
   182         HighTierContext context = getDefaultHighTierContext();
   181         HighTierContext context = getDefaultHighTierContext();
   183         createInliningPhase().apply(graph, context);
   182         createInliningPhase().apply(graph, context);
   184         new PartialEscapePhase(false, true, new CanonicalizerPhase(), null, graph.getOptions()).apply(graph, context);
   183         new PartialEscapePhase(false, true, createCanonicalizerPhase(), null, graph.getOptions()).apply(graph, context);
   185         return graph;
   184         return graph;
   186     }
   185     }
   187 }
   186 }