summaryrefslogtreecommitdiff
path: root/compiler/optimizing/scheduler_test.cc
diff options
context:
space:
mode:
author Vladimir Marko <vmarko@google.com> 2017-10-09 12:58:04 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-10-09 12:58:04 +0000
commit0967cd94860178a5809a9678d005b18c20c24707 (patch)
treef9e0c97fc7efbdbd8236b1f280227f1c9457d089 /compiler/optimizing/scheduler_test.cc
parent464f8cd7385a9958c3171e2feaa93c726043bbf8 (diff)
parente764d2e50c544c2cb98ee61a15d613161ac6bd17 (diff)
Merge "Use ScopedArenaAllocator for register allocation."
Diffstat (limited to 'compiler/optimizing/scheduler_test.cc')
-rw-r--r--compiler/optimizing/scheduler_test.cc18
1 files changed, 6 insertions, 12 deletions
diff --git a/compiler/optimizing/scheduler_test.cc b/compiler/optimizing/scheduler_test.cc
index 7e1ec70789..dfc1633fe6 100644
--- a/compiler/optimizing/scheduler_test.cc
+++ b/compiler/optimizing/scheduler_test.cc
@@ -146,8 +146,7 @@ class SchedulerTest : public OptimizingUnitTest {
environment->SetRawEnvAt(1, mul);
mul->AddEnvUseAt(div_check->GetEnvironment(), 1);
- ScopedArenaAllocator allocator(graph_->GetArenaStack());
- SchedulingGraph scheduling_graph(scheduler, &allocator);
+ SchedulingGraph scheduling_graph(scheduler, GetScopedAllocator());
// Instructions must be inserted in reverse order into the scheduling graph.
for (HInstruction* instr : ReverseRange(block_instructions)) {
scheduling_graph.AddNode(instr);
@@ -273,8 +272,7 @@ class SchedulerTest : public OptimizingUnitTest {
entry->AddInstruction(instr);
}
- ScopedArenaAllocator allocator(graph_->GetArenaStack());
- SchedulingGraph scheduling_graph(scheduler, &allocator);
+ SchedulingGraph scheduling_graph(scheduler, GetScopedAllocator());
HeapLocationCollector heap_location_collector(graph_);
heap_location_collector.VisitBasicBlock(entry);
heap_location_collector.BuildAliasingMatrix();
@@ -352,15 +350,13 @@ class SchedulerTest : public OptimizingUnitTest {
#if defined(ART_ENABLE_CODEGEN_arm64)
TEST_F(SchedulerTest, DependencyGraphAndSchedulerARM64) {
CriticalPathSchedulingNodeSelector critical_path_selector;
- ScopedArenaAllocator allocator(GetArenaStack());
- arm64::HSchedulerARM64 scheduler(&allocator, &critical_path_selector);
+ arm64::HSchedulerARM64 scheduler(GetScopedAllocator(), &critical_path_selector);
TestBuildDependencyGraphAndSchedule(&scheduler);
}
TEST_F(SchedulerTest, ArrayAccessAliasingARM64) {
CriticalPathSchedulingNodeSelector critical_path_selector;
- ScopedArenaAllocator allocator(GetArenaStack());
- arm64::HSchedulerARM64 scheduler(&allocator, &critical_path_selector);
+ arm64::HSchedulerARM64 scheduler(GetScopedAllocator(), &critical_path_selector);
TestDependencyGraphOnAliasingArrayAccesses(&scheduler);
}
#endif
@@ -369,16 +365,14 @@ TEST_F(SchedulerTest, ArrayAccessAliasingARM64) {
TEST_F(SchedulerTest, DependencyGraphAndSchedulerARM) {
CriticalPathSchedulingNodeSelector critical_path_selector;
arm::SchedulingLatencyVisitorARM arm_latency_visitor(/*CodeGenerator*/ nullptr);
- ScopedArenaAllocator allocator(GetArenaStack());
- arm::HSchedulerARM scheduler(&allocator, &critical_path_selector, &arm_latency_visitor);
+ arm::HSchedulerARM scheduler(GetScopedAllocator(), &critical_path_selector, &arm_latency_visitor);
TestBuildDependencyGraphAndSchedule(&scheduler);
}
TEST_F(SchedulerTest, ArrayAccessAliasingARM) {
CriticalPathSchedulingNodeSelector critical_path_selector;
arm::SchedulingLatencyVisitorARM arm_latency_visitor(/*CodeGenerator*/ nullptr);
- ScopedArenaAllocator allocator(GetArenaStack());
- arm::HSchedulerARM scheduler(&allocator, &critical_path_selector, &arm_latency_visitor);
+ arm::HSchedulerARM scheduler(GetScopedAllocator(), &critical_path_selector, &arm_latency_visitor);
TestDependencyGraphOnAliasingArrayAccesses(&scheduler);
}
#endif