Commit f68cd33b authored by machenbach's avatar machenbach Committed by Commit bot

Revert of [turbofan] greedy: heuristic for memory operands (patchset #2...

Revert of [turbofan] greedy: heuristic for memory operands (patchset #2 id:40001 of https://codereview.chromium.org/1306823005/ )

Reason for revert:
[Sheriff] Breaks test with greedy allocator:
http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20debug%20-%20greedy%20allocator/builds/1318

Original issue's description:
> [turbofan] greedy: heuristic for memory operands
>
> When we have a memory operand (HasSpillOperand() == true), and it
> doesn't need a register immediately, split in an optimal position, which
> is outside the outermost possible loop - just like Linear does.
>
> This results in some modest improvements in perf, when compared
> to baseline greedy. In particular Jetstream zlib x64: 4.66%, Life
> (Emscripten x64) 11%; largest regression is in AreWeFastYet x64: 8%
> and Corrections (Emsccripten x32) 10%
>
> BUG=
>
> Committed: https://crrev.com/8937bfc1d165ff6d72dede1b0ce6f7c1ab9fb260
> Cr-Commit-Position: refs/heads/master@{#30498}

TBR=jarin@chromium.org,bmeurer@chromium.org,mtrofin@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/1311813005

Cr-Commit-Position: refs/heads/master@{#30501}
parent 5f57ebe2
......@@ -256,7 +256,7 @@ void GreedyAllocator::SplitAndSpillRangesDefinedByMemoryOperand() {
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 @@ void GreedyAllocator::SplitAndSpillRangesDefinedByMemoryOperand() {
} 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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment