summaryrefslogtreecommitdiff
path: root/compiler/optimizing/gvn_test.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2014-12-01 10:31:54 +0000
committer Nicolas Geoffray <ngeoffray@google.com> 2014-12-15 22:52:27 +0000
commite53798a7e3267305f696bf658e418c92e63e0834 (patch)
tree8979bbed96b107a5a6bbae9285ff4e0c362dad95 /compiler/optimizing/gvn_test.cc
parente6c0cdd11097dd72275ac24f1e98217c299d973e (diff)
Inlining support in optimizing.
Currently only inlines simple things that don't require an environment, such as: - Returning a constant. - Returning a parameter. - Returning an arithmetic operation. Change-Id: Ie844950cb44f69e104774a3cf7a8dea66bc85661
Diffstat (limited to 'compiler/optimizing/gvn_test.cc')
-rw-r--r--compiler/optimizing/gvn_test.cc14
1 files changed, 4 insertions, 10 deletions
diff --git a/compiler/optimizing/gvn_test.cc b/compiler/optimizing/gvn_test.cc
index a6a68ca59d..94ff192264 100644
--- a/compiler/optimizing/gvn_test.cc
+++ b/compiler/optimizing/gvn_test.cc
@@ -59,8 +59,7 @@ TEST(GVNTest, LocalFieldElimination) {
ASSERT_EQ(different_offset->GetBlock(), block);
ASSERT_EQ(use_after_kill->GetBlock(), block);
- graph->BuildDominatorTree();
- graph->TransformToSSA();
+ graph->TryBuildingSsa();
GlobalValueNumberer(&allocator, graph).Run();
ASSERT_TRUE(to_remove->GetBlock() == nullptr);
@@ -108,8 +107,7 @@ TEST(GVNTest, GlobalFieldElimination) {
new (&allocator) HInstanceFieldGet(parameter, Primitive::kPrimBoolean, MemberOffset(42)));
join->AddInstruction(new (&allocator) HExit());
- graph->BuildDominatorTree();
- graph->TransformToSSA();
+ graph->TryBuildingSsa();
GlobalValueNumberer(&allocator, graph).Run();
// Check that all field get instructions have been GVN'ed.
@@ -173,9 +171,7 @@ TEST(GVNTest, LoopFieldElimination) {
ASSERT_EQ(field_get_in_loop_body->GetBlock(), loop_body);
ASSERT_EQ(field_get_in_exit->GetBlock(), exit);
- graph->BuildDominatorTree();
- graph->TransformToSSA();
- graph->AnalyzeNaturalLoops();
+ graph->TryBuildingSsa();
GlobalValueNumberer(&allocator, graph).Run();
// Check that all field get instructions are still there.
@@ -237,9 +233,7 @@ TEST(GVNTest, LoopSideEffects) {
inner_loop_exit->AddInstruction(new (&allocator) HGoto());
outer_loop_exit->AddInstruction(new (&allocator) HExit());
- graph->BuildDominatorTree();
- graph->TransformToSSA();
- graph->AnalyzeNaturalLoops();
+ graph->TryBuildingSsa();
ASSERT_TRUE(inner_loop_header->GetLoopInformation()->IsIn(
*outer_loop_header->GetLoopInformation()));