summaryrefslogtreecommitdiffstats
path: root/compiler/dex/local_value_numbering_test.cc
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2014-09-30 18:09:14 +0100
committerVladimir Marko <vmarko@google.com>2014-10-17 15:16:08 +0100
commit415ac88a6471792a28cf2b457fe4ba9dc099396e (patch)
tree1a83ac3a5f224568af19fc4bf148d352a1a4e49c /compiler/dex/local_value_numbering_test.cc
parent02e7d4e802248574cee7224fea3352b6e558e4ee (diff)
downloadart-415ac88a6471792a28cf2b457fe4ba9dc099396e.zip
art-415ac88a6471792a28cf2b457fe4ba9dc099396e.tar.gz
art-415ac88a6471792a28cf2b457fe4ba9dc099396e.tar.bz2
Quick: In GVN, apply modifications early if outside loop.
To improve GVN performance, apply modifications to blocks outside loops during the initial convergence phase. During the post processing phase, apply modifications only to the blocks belonging to loops. Also clean up the check whether to run the LVN and add the capability to limit the maximum number of nested loops we allow the GVN to process. Change-Id: Ie7f1254f91a442397c06a325d5d314d8f58e5012
Diffstat (limited to 'compiler/dex/local_value_numbering_test.cc')
-rw-r--r--compiler/dex/local_value_numbering_test.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/dex/local_value_numbering_test.cc b/compiler/dex/local_value_numbering_test.cc
index 067bea2..33d6c14 100644
--- a/compiler/dex/local_value_numbering_test.cc
+++ b/compiler/dex/local_value_numbering_test.cc
@@ -195,9 +195,9 @@ class LocalValueNumberingTest : public testing::Test {
value_names_() {
cu_.mir_graph.reset(new MIRGraph(&cu_, &cu_.arena));
allocator_.reset(ScopedArenaAllocator::Create(&cu_.arena_stack));
- gvn_.reset(new (allocator_.get()) GlobalValueNumbering(&cu_, allocator_.get()));
+ gvn_.reset(new (allocator_.get()) GlobalValueNumbering(&cu_, allocator_.get(),
+ GlobalValueNumbering::kModeLvn));
lvn_.reset(new (allocator_.get()) LocalValueNumbering(gvn_.get(), 0u, allocator_.get()));
- gvn_->AllowModifications();
}
ArenaPool pool_;