diff options
| author | 2015-12-16 08:35:46 +0000 | |
|---|---|---|
| committer | 2015-12-16 08:35:46 +0000 | |
| commit | b059c8a044ed3ede1a0eea4b1e92008ced90c013 (patch) | |
| tree | 6f87852b9d14e479ea2c7ef92de35c3118a0fd1e /compiler/optimizing/ssa_test.cc | |
| parent | bc90a0538e56f98b8e138cb622e6b9d834244ad9 (diff) | |
| parent | 68289a531484d26214e09f1eadd9833531a3bc3c (diff) | |
Merge "Revert "ART: Refactor SsaBuilder for more precise typing info""
Diffstat (limited to 'compiler/optimizing/ssa_test.cc')
| -rw-r--r-- | compiler/optimizing/ssa_test.cc | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/compiler/optimizing/ssa_test.cc b/compiler/optimizing/ssa_test.cc index d2885a8fd7..024278f4b2 100644 --- a/compiler/optimizing/ssa_test.cc +++ b/compiler/optimizing/ssa_test.cc @@ -28,8 +28,6 @@ namespace art { -class SsaTest : public CommonCompilerTest {}; - class SsaPrettyPrinter : public HPrettyPrinter { public: explicit SsaPrettyPrinter(HGraph* graph) : HPrettyPrinter(graph), str_("") {} @@ -85,10 +83,11 @@ static void TestCode(const uint16_t* data, const char* expected) { bool graph_built = builder.BuildGraph(*item); ASSERT_TRUE(graph_built); - TransformToSsa(graph); + graph->BuildDominatorTree(); // Suspend checks implementation may change in the future, and this test relies // on how instructions are ordered. RemoveSuspendChecks(graph); + graph->TransformToSsa(); ReNumberInstructions(graph); // Test that phis had their type set. @@ -104,7 +103,7 @@ static void TestCode(const uint16_t* data, const char* expected) { ASSERT_STREQ(expected, printer.str().c_str()); } -TEST_F(SsaTest, CFG1) { +TEST(SsaTest, CFG1) { // Test that we get rid of loads and stores. const char* expected = "BasicBlock 0, succ: 1\n" @@ -132,7 +131,7 @@ TEST_F(SsaTest, CFG1) { TestCode(data, expected); } -TEST_F(SsaTest, CFG2) { +TEST(SsaTest, CFG2) { // Test that we create a phi for the join block of an if control flow instruction // when there is only code in the else branch. const char* expected = @@ -163,7 +162,7 @@ TEST_F(SsaTest, CFG2) { TestCode(data, expected); } -TEST_F(SsaTest, CFG3) { +TEST(SsaTest, CFG3) { // Test that we create a phi for the join block of an if control flow instruction // when both branches update a local. const char* expected = @@ -196,7 +195,7 @@ TEST_F(SsaTest, CFG3) { TestCode(data, expected); } -TEST_F(SsaTest, Loop1) { +TEST(SsaTest, Loop1) { // Test that we create a phi for an initialized local at entry of a loop. const char* expected = "BasicBlock 0, succ: 1\n" @@ -229,7 +228,7 @@ TEST_F(SsaTest, Loop1) { TestCode(data, expected); } -TEST_F(SsaTest, Loop2) { +TEST(SsaTest, Loop2) { // Simple loop with one preheader and one back edge. const char* expected = "BasicBlock 0, succ: 1\n" @@ -259,7 +258,7 @@ TEST_F(SsaTest, Loop2) { TestCode(data, expected); } -TEST_F(SsaTest, Loop3) { +TEST(SsaTest, Loop3) { // Test that a local not yet defined at the entry of a loop is handled properly. const char* expected = "BasicBlock 0, succ: 1\n" @@ -291,7 +290,7 @@ TEST_F(SsaTest, Loop3) { TestCode(data, expected); } -TEST_F(SsaTest, Loop4) { +TEST(SsaTest, Loop4) { // Make sure we support a preheader of a loop not being the first predecessor // in the predecessor list of the header. const char* expected = @@ -326,7 +325,7 @@ TEST_F(SsaTest, Loop4) { TestCode(data, expected); } -TEST_F(SsaTest, Loop5) { +TEST(SsaTest, Loop5) { // Make sure we create a preheader of a loop when a header originally has two // incoming blocks and one back edge. const char* expected = @@ -368,7 +367,7 @@ TEST_F(SsaTest, Loop5) { TestCode(data, expected); } -TEST_F(SsaTest, Loop6) { +TEST(SsaTest, Loop6) { // Test a loop with one preheader and two back edges (e.g. continue). const char* expected = "BasicBlock 0, succ: 1\n" @@ -407,7 +406,7 @@ TEST_F(SsaTest, Loop6) { TestCode(data, expected); } -TEST_F(SsaTest, Loop7) { +TEST(SsaTest, Loop7) { // Test a loop with one preheader, one back edge, and two exit edges (e.g. break). const char* expected = "BasicBlock 0, succ: 1\n" @@ -449,7 +448,7 @@ TEST_F(SsaTest, Loop7) { TestCode(data, expected); } -TEST_F(SsaTest, DeadLocal) { +TEST(SsaTest, DeadLocal) { // Test that we correctly handle a local not being used. const char* expected = "BasicBlock 0, succ: 1\n" @@ -467,7 +466,7 @@ TEST_F(SsaTest, DeadLocal) { TestCode(data, expected); } -TEST_F(SsaTest, LocalInIf) { +TEST(SsaTest, LocalInIf) { // Test that we do not create a phi in the join block when one predecessor // does not update the local. const char* expected = @@ -497,7 +496,7 @@ TEST_F(SsaTest, LocalInIf) { TestCode(data, expected); } -TEST_F(SsaTest, MultiplePredecessors) { +TEST(SsaTest, MultiplePredecessors) { // Test that we do not create a phi when one predecessor // does not update the local. const char* expected = |