From b3e773eea39a156b3eacf915ba84e3af1a5c14fa Mon Sep 17 00:00:00 2001 From: David Brazdil Date: Tue, 26 Jan 2016 11:28:37 +0000 Subject: ART: Implement support for instruction inlining Optimizing HIR contains 'non-materialized' instructions which are emitted at their use sites rather than their defining sites. This was not properly handled by the liveness analysis which did not adjust the use positions of the inputs of such instructions. Despite the analysis being incorrect, the current use cases never produce incorrect code. This patch generalizes the concept of inlined instructions and updates liveness analysis to set the compute use positions correctly. Change-Id: Id703c154b20ab861241ae5c715a150385d3ff621 --- compiler/optimizing/live_ranges_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/optimizing/live_ranges_test.cc') diff --git a/compiler/optimizing/live_ranges_test.cc b/compiler/optimizing/live_ranges_test.cc index 926f9399a5..991f8f70ea 100644 --- a/compiler/optimizing/live_ranges_test.cc +++ b/compiler/optimizing/live_ranges_test.cc @@ -278,9 +278,9 @@ TEST_F(LiveRangesTest, Loop1) { // Test for the phi. interval = liveness.GetInstructionFromSsaIndex(3)->GetLiveInterval(); range = interval->GetFirstRange(); - // Instruction is consumed by the if. + // Instruction is input of non-materialized Equal and hence live until If. ASSERT_EQ(14u, range->GetStart()); - ASSERT_EQ(17u, range->GetEnd()); + ASSERT_EQ(19u, range->GetEnd()); ASSERT_TRUE(range->GetNext() == nullptr); } -- cgit v1.2.3-59-g8ed1b