src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PEGraphDecoderTest.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/PEGraphDecoderTest.java

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

Print this page

        

*** 22,35 **** */ package org.graalvm.compiler.replacements.test; import static org.graalvm.compiler.nodes.graphbuilderconf.InlineInvokePlugin.InlineInfo.createStandardInlineInfo; - import org.junit.Test; import org.graalvm.compiler.core.common.type.StampFactory; import org.graalvm.compiler.core.test.GraalCompilerTest; ! import org.graalvm.compiler.debug.Debug; import org.graalvm.compiler.nodes.AbstractBeginNode; import org.graalvm.compiler.nodes.StructuredGraph; import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions; import org.graalvm.compiler.nodes.ValueNode; import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration; --- 22,34 ---- */ package org.graalvm.compiler.replacements.test; import static org.graalvm.compiler.nodes.graphbuilderconf.InlineInvokePlugin.InlineInfo.createStandardInlineInfo; import org.graalvm.compiler.core.common.type.StampFactory; import org.graalvm.compiler.core.test.GraalCompilerTest; ! import org.graalvm.compiler.debug.DebugContext; import org.graalvm.compiler.nodes.AbstractBeginNode; import org.graalvm.compiler.nodes.StructuredGraph; import org.graalvm.compiler.nodes.StructuredGraph.AllowAssumptions; import org.graalvm.compiler.nodes.ValueNode; import org.graalvm.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration;
*** 45,54 **** --- 44,54 ---- import org.graalvm.compiler.phases.OptimisticOptimizations; import org.graalvm.compiler.phases.common.CanonicalizerPhase; import org.graalvm.compiler.phases.tiers.PhaseContext; import org.graalvm.compiler.replacements.CachingPEGraphDecoder; import org.graalvm.word.LocationIdentity; + import org.junit.Test; import jdk.vm.ci.meta.JavaKind; import jdk.vm.ci.meta.ResolvedJavaMethod; public class PEGraphDecoderTest extends GraalCompilerTest {
*** 128,155 **** @Test @SuppressWarnings("try") public void test() { ResolvedJavaMethod testMethod = getResolvedJavaMethod(PEGraphDecoderTest.class, "doTest", Object.class); StructuredGraph targetGraph = null; ! try (Debug.Scope scope = Debug.scope("GraphPETest", testMethod)) { GraphBuilderConfiguration graphBuilderConfig = GraphBuilderConfiguration.getDefault(getDefaultGraphBuilderPlugins()).withEagerResolving(true); registerPlugins(graphBuilderConfig.getPlugins().getInvocationPlugins()); ! targetGraph = new StructuredGraph.Builder(getInitialOptions(), AllowAssumptions.YES).method(testMethod).build(); CachingPEGraphDecoder decoder = new CachingPEGraphDecoder(getTarget().arch, targetGraph, getProviders(), graphBuilderConfig, OptimisticOptimizations.NONE, AllowAssumptions.YES, ! getInitialOptions(), null, null, new InlineInvokePlugin[]{new InlineAll()}, null, null); decoder.decode(testMethod); ! Debug.dump(Debug.BASIC_LEVEL, targetGraph, "Target Graph"); targetGraph.verify(); PhaseContext context = new PhaseContext(getProviders()); new CanonicalizerPhase().apply(targetGraph, context); targetGraph.verify(); } catch (Throwable ex) { if (targetGraph != null) { ! Debug.dump(Debug.BASIC_LEVEL, targetGraph, ex.toString()); } ! Debug.handle(ex); } } } --- 128,156 ---- @Test @SuppressWarnings("try") public void test() { ResolvedJavaMethod testMethod = getResolvedJavaMethod(PEGraphDecoderTest.class, "doTest", Object.class); StructuredGraph targetGraph = null; ! DebugContext debug = getDebugContext(); ! try (DebugContext.Scope scope = debug.scope("GraphPETest", testMethod)) { GraphBuilderConfiguration graphBuilderConfig = GraphBuilderConfiguration.getDefault(getDefaultGraphBuilderPlugins()).withEagerResolving(true); registerPlugins(graphBuilderConfig.getPlugins().getInvocationPlugins()); ! targetGraph = new StructuredGraph.Builder(getInitialOptions(), debug, AllowAssumptions.YES).method(testMethod).build(); CachingPEGraphDecoder decoder = new CachingPEGraphDecoder(getTarget().arch, targetGraph, getProviders(), graphBuilderConfig, OptimisticOptimizations.NONE, AllowAssumptions.YES, ! null, null, new InlineInvokePlugin[]{new InlineAll()}, null, null); decoder.decode(testMethod); ! debug.dump(DebugContext.BASIC_LEVEL, targetGraph, "Target Graph"); targetGraph.verify(); PhaseContext context = new PhaseContext(getProviders()); new CanonicalizerPhase().apply(targetGraph, context); targetGraph.verify(); } catch (Throwable ex) { if (targetGraph != null) { ! debug.dump(DebugContext.BASIC_LEVEL, targetGraph, ex.toString()); } ! debug.handle(ex); } } }
src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.test/src/org/graalvm/compiler/replacements/test/PEGraphDecoderTest.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File