Search in sources :

Example 26 with ScheduleResult

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

the class MemoryScheduleTest method testIfRead1.

@Test
public void testIfRead1() {
    ScheduleResult schedule = getFinalSchedule("testIfRead1Snippet", TestMode.WITHOUT_FRAMESTATES);
    assertDeepEquals(3, schedule.getCFG().getBlocks().length);
    assertReadWithinStartBlock(schedule, true);
    assertReadAndWriteInSameBlock(schedule, false);
}
Also used : ScheduleResult(org.graalvm.compiler.nodes.StructuredGraph.ScheduleResult) Test(org.junit.Test)

Example 27 with ScheduleResult

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

the class MemoryScheduleTest method testLoop2.

@Test
public void testLoop2() {
    ScheduleResult schedule = getFinalSchedule("testLoop2Snippet", TestMode.WITHOUT_FRAMESTATES);
    assertDeepEquals(6, schedule.getCFG().getBlocks().length);
    assertReadWithinStartBlock(schedule, false);
    assertReadWithinAllReturnBlocks(schedule, true);
}
Also used : ScheduleResult(org.graalvm.compiler.nodes.StructuredGraph.ScheduleResult) Test(org.junit.Test)

Example 28 with ScheduleResult

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

the class MemoryScheduleTest method testLoop8.

@Test
public void testLoop8() {
    ScheduleResult schedule = getFinalSchedule("testLoop8Snippet", TestMode.WITHOUT_FRAMESTATES);
    assertDeepEquals(10, schedule.getCFG().getBlocks().length);
    assertReadWithinStartBlock(schedule, true);
    assertReadWithinAllReturnBlocks(schedule, false);
}
Also used : ScheduleResult(org.graalvm.compiler.nodes.StructuredGraph.ScheduleResult) Test(org.junit.Test)

Example 29 with ScheduleResult

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

the class MemoryScheduleTest method testLoop1.

@Test
public void testLoop1() {
    ScheduleResult schedule = getFinalSchedule("testLoop1Snippet", TestMode.WITHOUT_FRAMESTATES);
    assertDeepEquals(6, schedule.getCFG().getBlocks().length);
    assertReadWithinStartBlock(schedule, true);
    assertReadWithinAllReturnBlocks(schedule, false);
}
Also used : ScheduleResult(org.graalvm.compiler.nodes.StructuredGraph.ScheduleResult) Test(org.junit.Test)

Example 30 with ScheduleResult

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

the class MemoryScheduleTest method testLoop6.

@Test
public void testLoop6() {
    ScheduleResult schedule = getFinalSchedule("testLoop6Snippet", TestMode.WITHOUT_FRAMESTATES);
    assertDeepEquals(13, schedule.getCFG().getBlocks().length);
    assertReadWithinStartBlock(schedule, false);
    assertReadWithinAllReturnBlocks(schedule, false);
}
Also used : ScheduleResult(org.graalvm.compiler.nodes.StructuredGraph.ScheduleResult) Test(org.junit.Test)

Aggregations

ScheduleResult (org.graalvm.compiler.nodes.StructuredGraph.ScheduleResult)38 Test (org.junit.Test)24 Block (org.graalvm.compiler.nodes.cfg.Block)14 Node (org.graalvm.compiler.graph.Node)10 SchedulePhase (org.graalvm.compiler.phases.schedule.SchedulePhase)9 StructuredGraph (org.graalvm.compiler.nodes.StructuredGraph)8 ConstantNode (org.graalvm.compiler.nodes.ConstantNode)6 ValueNode (org.graalvm.compiler.nodes.ValueNode)6 List (java.util.List)5 AbstractMergeNode (org.graalvm.compiler.nodes.AbstractMergeNode)5 FixedWithNextNode (org.graalvm.compiler.nodes.FixedWithNextNode)5 LoopExitNode (org.graalvm.compiler.nodes.LoopExitNode)5 DebugContext (org.graalvm.compiler.debug.DebugContext)4 FixedNode (org.graalvm.compiler.nodes.FixedNode)4 FrameState (org.graalvm.compiler.nodes.FrameState)4 LoopBeginNode (org.graalvm.compiler.nodes.LoopBeginNode)4 ReturnNode (org.graalvm.compiler.nodes.ReturnNode)4 InitializeKlassNode (org.graalvm.compiler.hotspot.nodes.aot.InitializeKlassNode)3 LoadConstantIndirectlyFixedNode (org.graalvm.compiler.hotspot.nodes.aot.LoadConstantIndirectlyFixedNode)3 LoadConstantIndirectlyNode (org.graalvm.compiler.hotspot.nodes.aot.LoadConstantIndirectlyNode)3