< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.api.directives.test/src/org/graalvm/compiler/api/directives/test/BlackholeDirectiveTest.java

Print this page

        

*** 32,41 **** --- 32,44 ---- import org.graalvm.compiler.api.directives.GraalDirectives; import org.graalvm.compiler.core.test.GraalCompilerTest; import org.graalvm.compiler.nodes.ParameterNode; import org.graalvm.compiler.nodes.StructuredGraph; + import org.graalvm.compiler.phases.OptimisticOptimizations; + import org.graalvm.compiler.phases.OptimisticOptimizations.Optimization; + import org.graalvm.compiler.phases.tiers.HighTierContext; /** * Tests for {@link GraalDirectives#blackhole}. * * There are two snippets for each kind:
*** 127,136 **** --- 130,144 ---- test("objectSnippet", 37); test("blackholeObjectSnippet", 37); } @Override + protected HighTierContext getDefaultHighTierContext() { + return new HighTierContext(getProviders(), getDefaultGraphBuilderSuite(), OptimisticOptimizations.ALL.remove(Optimization.RemoveNeverExecutedCode)); + } + + @Override protected boolean checkLowTierGraph(StructuredGraph graph) { BlackholeSnippet snippet = graph.method().getAnnotation(BlackholeSnippet.class); ParameterNode arg = graph.getParameter(0); if (snippet.expectParameterUsage()) { Assert.assertNotNull("couldn't find ParameterNode(0)", arg);
< prev index next >