Search in sources :

Example 26 with StructuredGraph

use of org.graalvm.compiler.nodes.StructuredGraph in project graal by oracle.

the class PEAReadEliminationTest method testUnsafe3.

@Test
public void testUnsafe3() {
    StructuredGraph graph = processMethod("testUnsafe3Snippet");
    assertDeepEquals(1, graph.getNodes().filter(RawLoadNode.class).count());
}
Also used : StructuredGraph(org.graalvm.compiler.nodes.StructuredGraph) Test(org.junit.Test) GraalCompilerTest(org.graalvm.compiler.core.test.GraalCompilerTest)

Example 27 with StructuredGraph

use of org.graalvm.compiler.nodes.StructuredGraph in project graal by oracle.

the class PEAReadEliminationTest method testUnsafe2.

@Test
public void testUnsafe2() {
    StructuredGraph graph = processMethod("testUnsafe2Snippet");
    assertDeepEquals(3, graph.getNodes().filter(RawLoadNode.class).count());
}
Also used : StructuredGraph(org.graalvm.compiler.nodes.StructuredGraph) Test(org.junit.Test) GraalCompilerTest(org.graalvm.compiler.core.test.GraalCompilerTest)

Example 28 with StructuredGraph

use of org.graalvm.compiler.nodes.StructuredGraph in project graal by oracle.

the class PEAReadEliminationTest method testIndexed3.

@Test
public void testIndexed3() {
    StructuredGraph graph = processMethod("testIndexed3Snippet");
    assertDeepEquals(3, graph.getNodes().filter(LoadIndexedNode.class).count());
}
Also used : StructuredGraph(org.graalvm.compiler.nodes.StructuredGraph) Test(org.junit.Test) GraalCompilerTest(org.graalvm.compiler.core.test.GraalCompilerTest)

Example 29 with StructuredGraph

use of org.graalvm.compiler.nodes.StructuredGraph in project graal by oracle.

the class PEAReadEliminationTest method testIndexed1.

@Test
public void testIndexed1() {
    StructuredGraph graph = processMethod("testIndexed1Snippet");
    assertDeepEquals(0, graph.getNodes().filter(LoadIndexedNode.class).count());
}
Also used : StructuredGraph(org.graalvm.compiler.nodes.StructuredGraph) Test(org.junit.Test) GraalCompilerTest(org.graalvm.compiler.core.test.GraalCompilerTest)

Example 30 with StructuredGraph

use of org.graalvm.compiler.nodes.StructuredGraph in project graal by oracle.

the class PEAReadEliminationTest method testIndexed2.

@Test
public void testIndexed2() {
    StructuredGraph graph = processMethod("testIndexed2Snippet");
    assertDeepEquals(3, graph.getNodes().filter(LoadIndexedNode.class).count());
    assertDeepEquals(7, graph.getNodes().filter(StoreIndexedNode.class).count());
}
Also used : StructuredGraph(org.graalvm.compiler.nodes.StructuredGraph) Test(org.junit.Test) GraalCompilerTest(org.graalvm.compiler.core.test.GraalCompilerTest)

Aggregations

StructuredGraph (org.graalvm.compiler.nodes.StructuredGraph)360 CanonicalizerPhase (org.graalvm.compiler.phases.common.CanonicalizerPhase)97 Test (org.junit.Test)96 DebugContext (org.graalvm.compiler.debug.DebugContext)88 ValueNode (org.graalvm.compiler.nodes.ValueNode)70 ResolvedJavaMethod (jdk.vm.ci.meta.ResolvedJavaMethod)62 HighTierContext (org.graalvm.compiler.phases.tiers.HighTierContext)62 PhaseContext (org.graalvm.compiler.phases.tiers.PhaseContext)57 Node (org.graalvm.compiler.graph.Node)39 ConstantNode (org.graalvm.compiler.nodes.ConstantNode)37 OptionValues (org.graalvm.compiler.options.OptionValues)34 LoweringPhase (org.graalvm.compiler.phases.common.LoweringPhase)28 GraalCompilerTest (org.graalvm.compiler.core.test.GraalCompilerTest)26 FixedNode (org.graalvm.compiler.nodes.FixedNode)26 ParameterNode (org.graalvm.compiler.nodes.ParameterNode)25 ReturnNode (org.graalvm.compiler.nodes.ReturnNode)24 InliningPhase (org.graalvm.compiler.phases.common.inlining.InliningPhase)24 LogicNode (org.graalvm.compiler.nodes.LogicNode)21 CompilationResult (org.graalvm.compiler.code.CompilationResult)19 AbstractBeginNode (org.graalvm.compiler.nodes.AbstractBeginNode)19