Revert "Refactor HGraphBuilder and SsaBuilder to remove HLocals"
Bug: 27995065
This reverts commit e3ff7b293be2a6791fe9d135d660c0cffe4bd73f.
Change-Id: I5363c7ce18f47fd422c15eed5423a345a57249d8
diff --git a/compiler/optimizing/live_ranges_test.cc b/compiler/optimizing/live_ranges_test.cc
index bdaef1d..3202493 100644
--- a/compiler/optimizing/live_ranges_test.cc
+++ b/compiler/optimizing/live_ranges_test.cc
@@ -211,8 +211,8 @@
*
* Which becomes the following graph (numbered by lifetime position):
* 2: constant0
- * 4: constant5
- * 6: constant4
+ * 4: constant4
+ * 6: constant5
* 8: goto
* |
* 12: goto
@@ -247,7 +247,7 @@
liveness.Analyze();
// Test for the 0 constant.
- LiveInterval* interval = graph->GetIntConstant(0)->GetLiveInterval();
+ LiveInterval* interval = liveness.GetInstructionFromSsaIndex(0)->GetLiveInterval();
LiveRange* range = interval->GetFirstRange();
ASSERT_EQ(2u, range->GetStart());
// Last use is the loop phi so instruction is live until
@@ -256,18 +256,18 @@
ASSERT_TRUE(range->GetNext() == nullptr);
// Test for the 4 constant.
- interval = graph->GetIntConstant(4)->GetLiveInterval();
+ interval = liveness.GetInstructionFromSsaIndex(1)->GetLiveInterval();
range = interval->GetFirstRange();
// The instruction is live until the end of the loop.
- ASSERT_EQ(6u, range->GetStart());
+ ASSERT_EQ(4u, range->GetStart());
ASSERT_EQ(24u, range->GetEnd());
ASSERT_TRUE(range->GetNext() == nullptr);
// Test for the 5 constant.
- interval = graph->GetIntConstant(5)->GetLiveInterval();
+ interval = liveness.GetInstructionFromSsaIndex(2)->GetLiveInterval();
range = interval->GetFirstRange();
// The instruction is live until the return instruction after the loop.
- ASSERT_EQ(4u, range->GetStart());
+ ASSERT_EQ(6u, range->GetStart());
ASSERT_EQ(26u, range->GetEnd());
ASSERT_TRUE(range->GetNext() == nullptr);