diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2015-01-26 15:18:36 +0000 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2015-01-26 16:02:35 +0000 |
commit | 827eedbfa882496407375f22b08243a38a5bd53b (patch) | |
tree | aa4ff781982ffd2f8a95d9a6cdeb1aa28a1f671a /compiler/optimizing/gvn_test.cc | |
parent | f90eec005997f98c1a9f874fbbf68414e5f9c766 (diff) | |
download | art-827eedbfa882496407375f22b08243a38a5bd53b.tar.gz art-827eedbfa882496407375f22b08243a38a5bd53b.tar.bz2 art-827eedbfa882496407375f22b08243a38a5bd53b.zip |
Move code around and address growable_array comment.
- Move SideEffectsAnalysis to its own file.
- Move most of gvn.h to gvn.cc.
- Don't call Resize in GrowableArray constructor, but just set num_used
directly.
Change-Id: I1f1291207945d678d3c99cc0ec1ec155bcae82f6
Diffstat (limited to 'compiler/optimizing/gvn_test.cc')
-rw-r--r-- | compiler/optimizing/gvn_test.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/optimizing/gvn_test.cc b/compiler/optimizing/gvn_test.cc index 9e630a7db0..4a48fee2fb 100644 --- a/compiler/optimizing/gvn_test.cc +++ b/compiler/optimizing/gvn_test.cc @@ -18,6 +18,7 @@ #include "gvn.h" #include "nodes.h" #include "optimizing_unit_test.h" +#include "side_effects_analysis.h" #include "utils/arena_allocator.h" #include "gtest/gtest.h" @@ -66,7 +67,7 @@ TEST(GVNTest, LocalFieldElimination) { graph->TryBuildingSsa(); SideEffectsAnalysis side_effects(graph); side_effects.Run(); - GlobalValueNumberer(&allocator, graph, side_effects).Run(); + GVNOptimization(graph, side_effects).Run(); ASSERT_TRUE(to_remove->GetBlock() == nullptr); ASSERT_EQ(different_offset->GetBlock(), block); @@ -120,7 +121,7 @@ TEST(GVNTest, GlobalFieldElimination) { graph->TryBuildingSsa(); SideEffectsAnalysis side_effects(graph); side_effects.Run(); - GlobalValueNumberer(&allocator, graph, side_effects).Run(); + GVNOptimization(graph, side_effects).Run(); // Check that all field get instructions have been GVN'ed. ASSERT_TRUE(then->GetFirstInstruction()->IsGoto()); @@ -191,7 +192,7 @@ TEST(GVNTest, LoopFieldElimination) { { SideEffectsAnalysis side_effects(graph); side_effects.Run(); - GlobalValueNumberer(&allocator, graph, side_effects).Run(); + GVNOptimization(graph, side_effects).Run(); } // Check that all field get instructions are still there. @@ -206,7 +207,7 @@ TEST(GVNTest, LoopFieldElimination) { { SideEffectsAnalysis side_effects(graph); side_effects.Run(); - GlobalValueNumberer(&allocator, graph, side_effects).Run(); + GVNOptimization(graph, side_effects).Run(); } ASSERT_TRUE(field_get_in_loop_header->GetBlock() == nullptr); |