Revert "Fix the computation of linear ordering."
Build is broken.
This reverts commit 3054a90063d379ab8c9e5a42a7daf0d644b48b07.
Change-Id: I259bc2bd6a58e30391b8176f3db5fdb5c07e4d6d
diff --git a/compiler/optimizing/linearize_test.cc b/compiler/optimizing/linearize_test.cc
index c49cf7e..6dd4207 100644
--- a/compiler/optimizing/linearize_test.cc
+++ b/compiler/optimizing/linearize_test.cc
@@ -50,9 +50,10 @@
SsaLivenessAnalysis liveness(*graph, &codegen);
liveness.Analyze();
- ASSERT_EQ(liveness.GetLinearOrder().Size(), number_of_blocks);
+ ASSERT_EQ(liveness.GetLinearPostOrder().Size(), number_of_blocks);
for (size_t i = 0; i < number_of_blocks; ++i) {
- ASSERT_EQ(liveness.GetLinearOrder().Get(i)->GetBlockId(), expected_order[i]);
+ ASSERT_EQ(liveness.GetLinearPostOrder().Get(number_of_blocks - i - 1)->GetBlockId(),
+ expected_order[i]);
}
}
@@ -193,58 +194,4 @@
TestCode(data, blocks, 12);
}
-TEST(LinearizeTest, CFG6) {
- // Block0
- // |
- // Block1
- // |
- // Block2 ++++++++++++++
- // | +
- // Block3 +
- // / \ +
- // Block8 Block4 +
- // | / \ +
- // Block5 <- Block9 Block6 +
- // |
- // Block7
- const uint16_t data[] = ONE_REGISTER_CODE_ITEM(
- Instruction::CONST_4 | 0 | 0,
- Instruction::GOTO | 0x0100,
- Instruction::IF_EQ, 0x0004,
- Instruction::IF_EQ, 0x0003,
- Instruction::RETURN_VOID,
- Instruction::GOTO | 0xFA00);
-
- const int blocks[] = {0, 1, 2, 3, 4, 6, 9, 8, 5, 7};
- TestCode(data, blocks, arraysize(blocks));
-}
-
-TEST(LinearizeTest, CFG7) {
- // Structure of this graph (+ are back edges)
- // Block0
- // |
- // Block1
- // |
- // Block2 ++++++++
- // | +
- // Block3 +
- // / \ +
- // Block4 Block8 +
- // / \ | +
- // Block5 Block9 - Block6 +
- // |
- // Block7
- //
- const uint16_t data[] = ONE_REGISTER_CODE_ITEM(
- Instruction::CONST_4 | 0 | 0,
- Instruction::GOTO | 0x0100,
- Instruction::IF_EQ, 0x0005,
- Instruction::IF_EQ, 0x0003,
- Instruction::RETURN_VOID,
- Instruction::GOTO | 0xFA00);
-
- const int blocks[] = {0, 1, 2, 3, 4, 9, 8, 6, 5, 7};
- TestCode(data, blocks, arraysize(blocks));
-}
-
} // namespace art