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

Unified Diff: src/compiler/greedy-allocator.cc

Issue 1311813005: Revert of [turbofan] greedy: heuristic for memory operands (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/greedy-allocator.cc
diff --git a/src/compiler/greedy-allocator.cc b/src/compiler/greedy-allocator.cc
index 5fdacb5e8236992e377c700f9ec9d5176fb8a7df..44f2d4f8160a4893cc3964e21fc0ecb6dd7629e5 100644
--- a/src/compiler/greedy-allocator.cc
+++ b/src/compiler/greedy-allocator.cc
@@ -256,7 +256,7 @@
for (size_t i = 0; i < initial_range_count; ++i) {
auto range = data()->live_ranges()[i];
if (!CanProcessRange(range)) continue;
- if (!range->HasSpillOperand()) continue;
+ if (range->HasNoSpillType()) continue;
LifetimePosition start = range->Start();
TRACE("Live range %d:%d is defined by a spill operand.\n",
@@ -273,11 +273,12 @@
} else if (pos->pos() > range->Start().NextStart()) {
// Do not spill live range eagerly if use position that can benefit from
// the register is too close to the start of live range.
- auto split_pos = GetSplitPositionForInstruction(
- range, data()->code(), pos->pos().ToInstructionIndex());
- split_pos =
- FindOptimalSplitPos(range->Start().NextFullStart(), split_pos);
-
+ auto split_pos = pos->pos();
+ if (data()->IsBlockBoundary(split_pos.Start())) {
+ split_pos = split_pos.Start();
+ } else {
+ split_pos = split_pos.PrevStart().End();
+ }
Split(range, data(), split_pos);
Spill(range);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698