summaryrefslogtreecommitdiff
path: root/compiler/optimizing/live_ranges_test.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2014-10-17 11:06:38 +0100
committer Nicolas Geoffray <ngeoffray@google.com> 2014-10-21 11:47:54 +0100
commit8e3964b766652a0478e8e0e303e8556c997675f1 (patch)
treeebae22017d3d3c872642cbc56610f67ff32a861d /compiler/optimizing/live_ranges_test.cc
parent5830247c351a1c40f37666584d6c390f32c31957 (diff)
Remove the notion of dies at entry.
- Instead, explicitly say that the output does not overlap. - Inputs that must be in a fixed register do die at entry, as we know they have a location that others can not take. - There is also no need to differentiate between an input move and a connecting sibling move - those can be put in the same parallel move instruction. Change-Id: I1b2b2827906601f822b59fb9d6a21d48e43bae27
Diffstat (limited to 'compiler/optimizing/live_ranges_test.cc')
-rw-r--r--compiler/optimizing/live_ranges_test.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/optimizing/live_ranges_test.cc b/compiler/optimizing/live_ranges_test.cc
index d5f4f902c8..89c949563b 100644
--- a/compiler/optimizing/live_ranges_test.cc
+++ b/compiler/optimizing/live_ranges_test.cc
@@ -73,7 +73,7 @@ TEST(LiveRangesTest, CFG1) {
LiveRange* range = interval->GetFirstRange();
ASSERT_EQ(2u, range->GetStart());
// Last use is the return instruction.
- ASSERT_EQ(9u, range->GetEnd());
+ ASSERT_EQ(8u, range->GetEnd());
HBasicBlock* block = graph->GetBlocks().Get(1);
ASSERT_TRUE(block->GetLastInstruction()->IsReturn());
ASSERT_EQ(8u, block->GetLastInstruction()->GetLifetimePosition());
@@ -119,7 +119,7 @@ TEST(LiveRangesTest, CFG2) {
LiveRange* range = interval->GetFirstRange();
ASSERT_EQ(2u, range->GetStart());
// Last use is the return instruction.
- ASSERT_EQ(23u, range->GetEnd());
+ ASSERT_EQ(22u, range->GetEnd());
HBasicBlock* block = graph->GetBlocks().Get(3);
ASSERT_TRUE(block->GetLastInstruction()->IsReturn());
ASSERT_EQ(22u, block->GetLastInstruction()->GetLifetimePosition());
@@ -193,7 +193,7 @@ TEST(LiveRangesTest, CFG3) {
range = interval->GetFirstRange();
ASSERT_EQ(22u, liveness.GetInstructionFromSsaIndex(2)->GetLifetimePosition());
ASSERT_EQ(22u, range->GetStart());
- ASSERT_EQ(25u, range->GetEnd());
+ ASSERT_EQ(24u, range->GetEnd());
ASSERT_TRUE(range->GetNext() == nullptr);
}
@@ -263,7 +263,7 @@ TEST(LiveRangesTest, Loop1) {
range = interval->GetFirstRange();
// The instruction is live until the return instruction after the loop.
ASSERT_EQ(6u, range->GetStart());
- ASSERT_EQ(27u, range->GetEnd());
+ ASSERT_EQ(26u, range->GetEnd());
ASSERT_TRUE(range->GetNext() == nullptr);
// Test for the phi.
@@ -271,7 +271,7 @@ TEST(LiveRangesTest, Loop1) {
range = interval->GetFirstRange();
// Instruction is consumed by the if.
ASSERT_EQ(14u, range->GetStart());
- ASSERT_EQ(16u, range->GetEnd());
+ ASSERT_EQ(17u, range->GetEnd());
ASSERT_TRUE(range->GetNext() == nullptr);
}
@@ -338,7 +338,7 @@ TEST(LiveRangesTest, Loop2) {
range = range->GetNext();
ASSERT_TRUE(range != nullptr);
ASSERT_EQ(24u, range->GetStart());
- ASSERT_EQ(27u, range->GetEnd());
+ ASSERT_EQ(26u, range->GetEnd());
// Test for the add instruction.
HAdd* add = liveness.GetInstructionFromSsaIndex(2)->AsAdd();
@@ -410,7 +410,7 @@ TEST(LiveRangesTest, CFG4) {
interval = liveness.GetInstructionFromSsaIndex(1)->GetLiveInterval();
range = interval->GetFirstRange();
ASSERT_EQ(4u, range->GetStart());
- ASSERT_EQ(29u, range->GetEnd());
+ ASSERT_EQ(28u, range->GetEnd());
ASSERT_TRUE(range->GetNext() == nullptr);
// Test for the first add.