src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/MethodSubstitutionTest.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Cdiff src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/MethodSubstitutionTest.java

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/MethodSubstitutionTest.java

Print this page

        

*** 24,35 **** import java.lang.reflect.InvocationTargetException; import org.graalvm.compiler.api.replacements.MethodSubstitution; import org.graalvm.compiler.core.test.GraalCompilerTest; ! import org.graalvm.compiler.debug.Debug; ! import org.graalvm.compiler.debug.Debug.Scope; import org.graalvm.compiler.graph.Node; import org.graalvm.compiler.nodes.Invoke; import org.graalvm.compiler.nodes.StructuredGraph; import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions; import org.graalvm.compiler.nodes.spi.LoweringTool; --- 24,34 ---- import java.lang.reflect.InvocationTargetException; import org.graalvm.compiler.api.replacements.MethodSubstitution; import org.graalvm.compiler.core.test.GraalCompilerTest; ! import org.graalvm.compiler.debug.DebugContext; import org.graalvm.compiler.graph.Node; import org.graalvm.compiler.nodes.Invoke; import org.graalvm.compiler.nodes.StructuredGraph; import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions; import org.graalvm.compiler.nodes.spi.LoweringTool;
*** 51,66 **** */ public abstract class MethodSubstitutionTest extends GraalCompilerTest { @SuppressWarnings("try") protected StructuredGraph testGraph(final String snippet) { ! try (Scope s = Debug.scope("MethodSubstitutionTest", getResolvedJavaMethod(snippet))) { ! StructuredGraph graph = parseEager(snippet, AllowAssumptions.YES); HighTierContext context = getDefaultHighTierContext(); ! Debug.dump(Debug.BASIC_LEVEL, graph, "Graph"); new InliningPhase(new CanonicalizerPhase()).apply(graph, context); ! Debug.dump(Debug.BASIC_LEVEL, graph, "Graph"); new CanonicalizerPhase().apply(graph, context); new DeadCodeEliminationPhase().apply(graph); // Try to ensure any macro nodes are lowered to expose any resulting invokes if (graph.getNodes().filter(MacroNode.class).isNotEmpty()) { new LoweringPhase(new CanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context); --- 50,66 ---- */ public abstract class MethodSubstitutionTest extends GraalCompilerTest { @SuppressWarnings("try") protected StructuredGraph testGraph(final String snippet) { ! DebugContext debug = getDebugContext(); ! try (DebugContext.Scope s = debug.scope("MethodSubstitutionTest", getResolvedJavaMethod(snippet))) { ! StructuredGraph graph = parseEager(snippet, AllowAssumptions.YES, debug); HighTierContext context = getDefaultHighTierContext(); ! debug.dump(DebugContext.BASIC_LEVEL, graph, "Graph"); new InliningPhase(new CanonicalizerPhase()).apply(graph, context); ! debug.dump(DebugContext.BASIC_LEVEL, graph, "Graph"); new CanonicalizerPhase().apply(graph, context); new DeadCodeEliminationPhase().apply(graph); // Try to ensure any macro nodes are lowered to expose any resulting invokes if (graph.getNodes().filter(MacroNode.class).isNotEmpty()) { new LoweringPhase(new CanonicalizerPhase(), LoweringTool.StandardLoweringStage.HIGH_TIER).apply(graph, context);
*** 70,80 **** } assertNotInGraph(graph, MacroNode.class); assertNotInGraph(graph, Invoke.class); return graph; } catch (Throwable e) { ! throw Debug.handle(e); } } protected static StructuredGraph assertNotInGraph(StructuredGraph graph, Class<?> clazz) { for (Node node : graph.getNodes()) { --- 70,80 ---- } assertNotInGraph(graph, MacroNode.class); assertNotInGraph(graph, Invoke.class); return graph; } catch (Throwable e) { ! throw debug.handle(e); } } protected static StructuredGraph assertNotInGraph(StructuredGraph graph, Class<?> clazz) { for (Node node : graph.getNodes()) {
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/MethodSubstitutionTest.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File