From 9620230700d4b451097c2163faa70627c9d8088a Mon Sep 17 00:00:00 2001 From: Aart Bik Date: Tue, 4 Oct 2016 17:33:56 -0700 Subject: 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 --- compiler/optimizing/loop_optimization_test.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'compiler/optimizing/loop_optimization_test.cc') 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. */ -- cgit v1.2.3-59-g8ed1b