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

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

Issue 1403163003: Revert of [turbofan] Splinter into one range. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/live-range-unittest.cc
diff --git a/test/unittests/compiler/live-range-unittest.cc b/test/unittests/compiler/live-range-unittest.cc
index e802aedff19d8cd088dda11df92aa847e2b1c8bc..886a8121c7c4e0f36f0da1989c07654fb1784272 100644
--- a/test/unittests/compiler/live-range-unittest.cc
+++ b/test/unittests/compiler/live-range-unittest.cc
@@ -32,14 +32,11 @@
TopLevelLiveRange* Splinter(TopLevelLiveRange* top, int start, int end,
int new_id = 0) {
- if (top->splinter() == nullptr) {
- TopLevelLiveRange* ret =
- new (zone()) TopLevelLiveRange(new_id, MachineType::kRepTagged);
- top->SetSplinter(ret);
- }
+ TopLevelLiveRange* ret =
+ new (zone()) TopLevelLiveRange(new_id, MachineType::kRepTagged);
top->Splinter(LifetimePosition::FromInt(start),
- LifetimePosition::FromInt(end), zone());
- return top->splinter();
+ LifetimePosition::FromInt(end), ret, zone());
+ return ret;
}
// Ranges first and second match structurally.
@@ -380,25 +377,6 @@
}
-TEST_F(LiveRangeUnitTest, SplinterMergeMultipleTimes) {
- TopLevelLiveRange* range =
- TestRangeBuilder(zone()).Add(0, 3).Add(5, 10).Add(12, 16).Build();
- Splinter(range, 4, 6);
- Splinter(range, 8, 14);
- TopLevelLiveRange* splinter = range->splinter();
- EXPECT_EQ(nullptr, range->next());
- EXPECT_EQ(nullptr, splinter->next());
- EXPECT_EQ(range, splinter->splintered_from());
-
- TopLevelLiveRange* expected_source =
- TestRangeBuilder(zone()).Add(0, 3).Add(6, 8).Add(14, 16).Build();
- TopLevelLiveRange* expected_splinter =
- TestRangeBuilder(zone()).Add(5, 6).Add(8, 10).Add(12, 14).Build();
- EXPECT_TRUE(RangesMatch(expected_source, range));
- EXPECT_TRUE(RangesMatch(expected_splinter, splinter));
-}
-
-
TEST_F(LiveRangeUnitTest, MergeMultipleIntervalsRight) {
TopLevelLiveRange* original =
TestRangeBuilder(zone()).Add(0, 3).Add(5, 8).Build();
@@ -438,9 +416,8 @@
TopLevelLiveRange* splinter =
new (zone()) TopLevelLiveRange(101, MachineType::kRepTagged);
- vreg->SetSplinter(splinter);
vreg->Splinter(LifetimePosition::FromInt(4), LifetimePosition::FromInt(12),
- zone());
+ splinter, zone());
EXPECT_EQ(101, splinter->vreg());
EXPECT_EQ(1, splinter->relative_id());
« 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