summaryrefslogtreecommitdiff
path: root/compiler/optimizing/gvn_test.cc
diff options
context:
space:
mode:
author David Brazdil <dbrazdil@google.com> 2015-12-14 13:38:20 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-12-14 13:38:20 +0000
commit795accfff05abfb69f54003ee3f096ef3ff6f1e4 (patch)
tree9f4e4ffb5fae25c4f14059fd1d772726e9d96170 /compiler/optimizing/gvn_test.cc
parentceec5a3c81925cf80a18954b2e585316450c575c (diff)
parentd9510dfc32349eeb4f2145c801f7ba1d5bccfb12 (diff)
Merge "ART: Refactor SsaBuilder for more precise typing info"
Diffstat (limited to 'compiler/optimizing/gvn_test.cc')
-rw-r--r--compiler/optimizing/gvn_test.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/compiler/optimizing/gvn_test.cc b/compiler/optimizing/gvn_test.cc
index de60cf21aa..9929696ded 100644
--- a/compiler/optimizing/gvn_test.cc
+++ b/compiler/optimizing/gvn_test.cc
@@ -21,11 +21,11 @@
#include "optimizing_unit_test.h"
#include "side_effects_analysis.h"
-#include "gtest/gtest.h"
-
namespace art {
-TEST(GVNTest, LocalFieldElimination) {
+class GVNTest : public CommonCompilerTest {};
+
+TEST_F(GVNTest, LocalFieldElimination) {
ArenaPool pool;
ArenaAllocator allocator(&pool);
NullHandle<mirror::DexCache> dex_cache;
@@ -100,7 +100,7 @@ TEST(GVNTest, LocalFieldElimination) {
ASSERT_EQ(different_offset->GetBlock(), block);
ASSERT_EQ(use_after_kill->GetBlock(), block);
- graph->TryBuildingSsa();
+ TransformToSsa(graph);
SideEffectsAnalysis side_effects(graph);
side_effects.Run();
GVNOptimization(graph, side_effects).Run();
@@ -110,7 +110,7 @@ TEST(GVNTest, LocalFieldElimination) {
ASSERT_EQ(use_after_kill->GetBlock(), block);
}
-TEST(GVNTest, GlobalFieldElimination) {
+TEST_F(GVNTest, GlobalFieldElimination) {
ArenaPool pool;
ArenaAllocator allocator(&pool);
NullHandle<mirror::DexCache> dex_cache;
@@ -182,7 +182,7 @@ TEST(GVNTest, GlobalFieldElimination) {
0));
join->AddInstruction(new (&allocator) HExit());
- graph->TryBuildingSsa();
+ TransformToSsa(graph);
SideEffectsAnalysis side_effects(graph);
side_effects.Run();
GVNOptimization(graph, side_effects).Run();
@@ -193,7 +193,7 @@ TEST(GVNTest, GlobalFieldElimination) {
ASSERT_TRUE(join->GetFirstInstruction()->IsExit());
}
-TEST(GVNTest, LoopFieldElimination) {
+TEST_F(GVNTest, LoopFieldElimination) {
ArenaPool pool;
ArenaAllocator allocator(&pool);
NullHandle<mirror::DexCache> dex_cache;
@@ -288,7 +288,7 @@ TEST(GVNTest, LoopFieldElimination) {
ASSERT_EQ(field_get_in_loop_body->GetBlock(), loop_body);
ASSERT_EQ(field_get_in_exit->GetBlock(), exit);
- graph->TryBuildingSsa();
+ TransformToSsa(graph);
{
SideEffectsAnalysis side_effects(graph);
side_effects.Run();
@@ -316,7 +316,7 @@ TEST(GVNTest, LoopFieldElimination) {
}
// Test that inner loops affect the side effects of the outer loop.
-TEST(GVNTest, LoopSideEffects) {
+TEST_F(GVNTest, LoopSideEffects) {
ArenaPool pool;
ArenaAllocator allocator(&pool);
NullHandle<mirror::DexCache> dex_cache;
@@ -364,7 +364,7 @@ TEST(GVNTest, LoopSideEffects) {
inner_loop_exit->AddInstruction(new (&allocator) HGoto());
outer_loop_exit->AddInstruction(new (&allocator) HExit());
- graph->TryBuildingSsa();
+ TransformToSsa(graph);
ASSERT_TRUE(inner_loop_header->GetLoopInformation()->IsIn(
*outer_loop_header->GetLoopInformation()));