diff options
author | David Brazdil <dbrazdil@google.com> | 2015-04-16 18:31:55 +0100 |
---|---|---|
committer | David Brazdil <dbrazdil@google.com> | 2015-04-17 17:13:57 +0100 |
commit | 3fc992f9dfe8f49ff350132323cc635f102b7b62 (patch) | |
tree | d5fdfaed3d79b435dc0b674d60565f1719b2a416 /compiler/optimizing/live_interval_test.cc | |
parent | 81b13f6b5244b664000d4bcad16920aadf3b7e29 (diff) | |
download | art-3fc992f9dfe8f49ff350132323cc635f102b7b62.tar.gz art-3fc992f9dfe8f49ff350132323cc635f102b7b62.tar.bz2 art-3fc992f9dfe8f49ff350132323cc635f102b7b62.zip |
ART: Improve range search caching in LiveInterval
Register allocator spends too long in LiveInterval queries. This patch
builds on previously introduced caching of range search results to
further speed up LiveInterval's Covers and FindIntersectionWith.
Only calls which are guaranteed to query the current->GetStart()
position are cached. Other calls are replaced with CoversSlow which
searches through the entire list of ranges.
Change-Id: I84d92b526e174caa70d6477497a06afd85016c4a
Diffstat (limited to 'compiler/optimizing/live_interval_test.cc')
-rw-r--r-- | compiler/optimizing/live_interval_test.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/optimizing/live_interval_test.cc b/compiler/optimizing/live_interval_test.cc index 28000c18f8..405f261986 100644 --- a/compiler/optimizing/live_interval_test.cc +++ b/compiler/optimizing/live_interval_test.cc @@ -84,13 +84,13 @@ TEST(LiveInterval, Covers) { { static constexpr size_t ranges[][2] = {{4, 12}, {14, 16}}; LiveInterval* interval = BuildInterval(ranges, arraysize(ranges), &allocator); + ASSERT_FALSE(interval->Covers(0)); ASSERT_TRUE(interval->Covers(4)); ASSERT_TRUE(interval->Covers(11)); - ASSERT_TRUE(interval->Covers(14)); - ASSERT_TRUE(interval->Covers(15)); - ASSERT_FALSE(interval->Covers(0)); ASSERT_FALSE(interval->Covers(12)); ASSERT_FALSE(interval->Covers(13)); + ASSERT_TRUE(interval->Covers(14)); + ASSERT_TRUE(interval->Covers(15)); ASSERT_FALSE(interval->Covers(16)); } } |