src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.test/src/org/graalvm/compiler/hotspot/test/ReplaceConstantNodesPhaseTest.java
changeset 58877 aec7bf35d6f5
parent 58299 6df94ce3ab2f
equal deleted inserted replaced
58876:1a8d65e71a66 58877:aec7bf35d6f5
   115     }
   115     }
   116 
   116 
   117     private void test(String name, int expectedInits, int expectedResolves, int expectedLoads) {
   117     private void test(String name, int expectedInits, int expectedResolves, int expectedLoads) {
   118         StructuredGraph graph = parseEager(name, AllowAssumptions.NO, new OptionValues(getInitialOptions(), GraalOptions.GeneratePIC, true));
   118         StructuredGraph graph = parseEager(name, AllowAssumptions.NO, new OptionValues(getInitialOptions(), GraalOptions.GeneratePIC, true));
   119         HighTierContext highTierContext = getDefaultHighTierContext();
   119         HighTierContext highTierContext = getDefaultHighTierContext();
   120         CanonicalizerPhase canonicalizer = new CanonicalizerPhase();
   120         CanonicalizerPhase canonicalizer = createCanonicalizerPhase();
   121         new EliminateRedundantInitializationPhase().apply(graph, highTierContext);
   121         new EliminateRedundantInitializationPhase().apply(graph, highTierContext);
   122         new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, highTierContext);
   122         new LoweringPhase(canonicalizer, LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, highTierContext);
   123         new LoadJavaMirrorWithKlassPhase(config).apply(graph, highTierContext);
   123         new LoadJavaMirrorWithKlassPhase(config).apply(graph, highTierContext);
   124         new ReplaceConstantNodesPhase(false).apply(graph, highTierContext);
   124         new ReplaceConstantNodesPhase(false).apply(graph, highTierContext);
   125         Assert.assertEquals(expectedInits, graph.getNodes().filter(InitializeKlassNode.class).count());
   125         Assert.assertEquals(expectedInits, graph.getNodes().filter(InitializeKlassNode.class).count());