use of org.graalvm.compiler.nodes.StructuredGraph.ScheduleResult in project graal by oracle.
the class MemoryScheduleTest method testIfRead2.
@Test
public void testIfRead2() {
ScheduleResult schedule = getFinalSchedule("testIfRead2Snippet", TestMode.WITHOUT_FRAMESTATES);
assertDeepEquals(3, schedule.getCFG().getBlocks().length);
assertDeepEquals(1, schedule.getCFG().graph.getNodes().filter(FloatingReadNode.class).count());
assertReadWithinStartBlock(schedule, false);
assertReadWithinAllReturnBlocks(schedule, false);
assertReadAndWriteInSameBlock(schedule, false);
}
use of org.graalvm.compiler.nodes.StructuredGraph.ScheduleResult in project graal by oracle.
the class MemoryScheduleTest method testSplit2.
@Test
public void testSplit2() {
ScheduleResult schedule = getFinalSchedule("testSplit2Snippet", TestMode.WITHOUT_FRAMESTATES);
assertReadWithinStartBlock(schedule, false);
assertReadWithinAllReturnBlocks(schedule, true);
}
use of org.graalvm.compiler.nodes.StructuredGraph.ScheduleResult in project graal by oracle.
the class MemoryScheduleTest method testAntiDependency.
@Test
public void testAntiDependency() {
ScheduleResult schedule = getFinalSchedule("testAntiDependencySnippet", TestMode.WITHOUT_FRAMESTATES);
assertDeepEquals(4, schedule.getCFG().getBlocks().length);
assertReadBeforeAllWritesInStartBlock(schedule);
}
use of org.graalvm.compiler.nodes.StructuredGraph.ScheduleResult in project graal by oracle.
the class MemoryScheduleTest method testSplit1.
@Test
public void testSplit1() {
for (TestMode mode : TestMode.values()) {
ScheduleResult schedule = getFinalSchedule("testSplit1Snippet", mode);
assertReadWithinStartBlock(schedule, true);
assertReadWithinAllReturnBlocks(schedule, false);
}
}
use of org.graalvm.compiler.nodes.StructuredGraph.ScheduleResult in project graal by oracle.
the class MemoryScheduleTest method testSimple.
@Test
public void testSimple() {
for (TestMode mode : TestMode.values()) {
ScheduleResult schedule = getFinalSchedule("testSimpleSnippet", mode);
StructuredGraph graph = schedule.getCFG().graph;
assertReadAndWriteInSameBlock(schedule, true);
assertOrderedAfterSchedule(schedule, graph.getNodes().filter(FloatingReadNode.class).first(), graph.getNodes().filter(WriteNode.class).first());
}
}
Aggregations