diff options
author | Aart Bik <ajcbik@google.com> | 2016-10-04 17:33:56 -0700 |
---|---|---|
committer | Aart Bik <ajcbik@google.com> | 2016-10-05 11:50:42 -0700 |
commit | 9620230700d4b451097c2163faa70627c9d8088a (patch) | |
tree | 695b96b9efeaa4c2cb3816e51904e19540fe3883 /compiler/optimizing/loop_optimization_test.cc | |
parent | 4aa6a93c46a959df1ab71ee7a68ad345338046ef (diff) |
Refactoring of graph linearization and linear order.
Rationale:
Ownership of graph's linear order and iterators was
a bit unclear now that other phases are using it.
New approach allows phases to compute their own
order, while ssa_liveness is sole owner for graph
(since it is not mutated afterwards).
Also shortens lifetime of loop's arena.
Test: test-art-host
Change-Id: Ib7137d1203a1e0a12db49868f4117d48a4277f30
Diffstat (limited to 'compiler/optimizing/loop_optimization_test.cc')
-rw-r--r-- | compiler/optimizing/loop_optimization_test.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/optimizing/loop_optimization_test.cc b/compiler/optimizing/loop_optimization_test.cc index 4d54afd14d..7805a69a06 100644 --- a/compiler/optimizing/loop_optimization_test.cc +++ b/compiler/optimizing/loop_optimization_test.cc @@ -31,7 +31,7 @@ class LoopOptimizationTest : public CommonCompilerTest { allocator_(&pool_), graph_(CreateGraph(&allocator_)), iva_(new (&allocator_) HInductionVarAnalysis(graph_)), - loop_opt_(new (&allocator_) HLoopOptimization(graph_, iva_, &allocator_)) { + loop_opt_(new (&allocator_) HLoopOptimization(graph_, iva_)) { BuildGraph(); } @@ -76,7 +76,9 @@ class LoopOptimizationTest : public CommonCompilerTest { void PerformAnalysis() { graph_->BuildDominatorTree(); iva_->Run(); - loop_opt_->Run(); + // Do not release the loop hierarchy. + loop_opt_->loop_allocator_ = &allocator_; + loop_opt_->LocalRun(); } /** Constructs string representation of computed loop hierarchy. */ |