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

Side by Side Diff: src/compiler/greedy-allocator.cc

Issue 1406223010: Revert "Revert of [turbofan] Remove redundant code.[...]" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | src/compiler/register-allocator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/greedy-allocator.h" 5 #include "src/compiler/greedy-allocator.h"
6 #include "src/compiler/register-allocator.h" 6 #include "src/compiler/register-allocator.h"
7 7
8 namespace v8 { 8 namespace v8 {
9 namespace internal { 9 namespace internal {
10 namespace compiler { 10 namespace compiler {
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 } 361 }
362 362
363 363
364 void GreedyAllocator::AllocateRegisters() { 364 void GreedyAllocator::AllocateRegisters() {
365 CHECK(scheduler().empty()); 365 CHECK(scheduler().empty());
366 CHECK(allocations_.empty()); 366 CHECK(allocations_.empty());
367 367
368 TRACE("Begin allocating function %s with the Greedy Allocator\n", 368 TRACE("Begin allocating function %s with the Greedy Allocator\n",
369 data()->debug_name()); 369 data()->debug_name());
370 370
371 SplitAndSpillRangesDefinedByMemoryOperand(); 371 SplitAndSpillRangesDefinedByMemoryOperand(true);
372 GroupLiveRanges(); 372 GroupLiveRanges();
373 ScheduleAllocationCandidates(); 373 ScheduleAllocationCandidates();
374 PreallocateFixedRanges(); 374 PreallocateFixedRanges();
375 while (!scheduler().empty()) { 375 while (!scheduler().empty()) {
376 AllocationCandidate candidate = scheduler().GetNext(); 376 AllocationCandidate candidate = scheduler().GetNext();
377 TryAllocateCandidate(candidate); 377 TryAllocateCandidate(candidate);
378 } 378 }
379 379
380 for (size_t i = 0; i < allocations_.size(); ++i) { 380 for (size_t i = 0; i < allocations_.size(); ++i) {
381 if (!allocations_[i]->empty()) { 381 if (!allocations_[i]->empty()) {
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 620
621 621
622 bool GreedyAllocator::IsProgressPossible(const LiveRange* range) { 622 bool GreedyAllocator::IsProgressPossible(const LiveRange* range) {
623 return range->CanBeSpilled(range->Start()) || 623 return range->CanBeSpilled(range->Start()) ||
624 GetLastResortSplitPosition(range).IsValid(); 624 GetLastResortSplitPosition(range).IsValid();
625 } 625 }
626 626
627 } // namespace compiler 627 } // namespace compiler
628 } // namespace internal 628 } // namespace internal
629 } // namespace v8 629 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/register-allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698