Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(410)

Unified Diff: test/unittests/compiler/coalesced-live-ranges-unittest.cc

Issue 1311983002: [turbofan] Separate LiveRange and TopLevelLiveRange concepts (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/register-allocator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/coalesced-live-ranges-unittest.cc
diff --git a/test/unittests/compiler/coalesced-live-ranges-unittest.cc b/test/unittests/compiler/coalesced-live-ranges-unittest.cc
index ea9ebdb20bf09047f06ca4ca75e5ceb0b777f8be..e728c9ff6461ae1cecb174ea9b1076c0f8718aef 100644
--- a/test/unittests/compiler/coalesced-live-ranges-unittest.cc
+++ b/test/unittests/compiler/coalesced-live-ranges-unittest.cc
@@ -29,7 +29,8 @@ class TestRangeBuilder {
LiveRange* Build(int start, int end) { return Add(start, end).Build(); }
LiveRange* Build() {
- LiveRange* range = new (zone_) LiveRange(id_, MachineType::kRepTagged);
+ TopLevelLiveRange* range =
+ new (zone_) TopLevelLiveRange(id_, MachineType::kRepTagged);
// Traverse the provided interval specifications backwards, because that is
// what LiveRange expects.
for (int i = static_cast<int>(pairs_.size()) - 1; i >= 0; --i) {
@@ -100,8 +101,9 @@ void CoalescedLiveRangesTest::RemoveConflicts(LiveRange* range) {
LiveRangeIDs seen(zone());
for (auto c = conflicts.Current(); c != nullptr;
c = conflicts.RemoveCurrentAndGetNext()) {
- EXPECT_FALSE(seen.count(c->id()) > 0);
- seen.insert(c->id());
+ int id = c->TopLevel()->vreg();
+ EXPECT_FALSE(seen.count(id) > 0);
+ seen.insert(c->TopLevel()->vreg());
}
}
@@ -118,7 +120,7 @@ bool CoalescedLiveRangesTest::IsRangeConflictingWith(const LiveRange* range,
auto conflicts = ranges().GetConflicts(range);
for (auto conflict = conflicts.Current(); conflict != nullptr;
conflict = conflicts.GetNext()) {
- found_ids.insert(conflict->id());
+ found_ids.insert(conflict->TopLevel()->vreg());
}
return found_ids == ids;
}
« no previous file with comments | « src/compiler/register-allocator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698