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

Side by Side Diff: src/crankshaft/lithium-allocator.cc

Issue 1405673003: provides a mechanism for optimizing compilers to select the different Register configuration. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add the TODO comments. 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 unified diff | Download patch
« no previous file with comments | « src/crankshaft/ia32/lithium-gap-resolver-ia32.cc ('k') | src/frames.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/crankshaft/lithium-allocator.h" 5 #include "src/crankshaft/lithium-allocator.h"
6 6
7 #include "src/crankshaft/hydrogen.h" 7 #include "src/crankshaft/hydrogen.h"
8 #include "src/crankshaft/lithium-inl.h" 8 #include "src/crankshaft/lithium-inl.h"
9 #include "src/crankshaft/lithium-allocator-inl.h" 9 #include "src/crankshaft/lithium-allocator-inl.h"
10 #include "src/register-configuration.h" 10 #include "src/register-configuration.h"
(...skipping 1444 matching lines...) Expand 10 before | Expand all | Expand 10 after
1455 map->RecordPointer(operand, chunk()->zone()); 1455 map->RecordPointer(operand, chunk()->zone());
1456 } 1456 }
1457 } 1457 }
1458 } 1458 }
1459 } 1459 }
1460 1460
1461 1461
1462 void LAllocator::AllocateGeneralRegisters() { 1462 void LAllocator::AllocateGeneralRegisters() {
1463 LAllocatorPhase phase("L_Allocate general registers", this); 1463 LAllocatorPhase phase("L_Allocate general registers", this);
1464 num_registers_ = 1464 num_registers_ =
1465 RegisterConfiguration::ArchDefault()->num_allocatable_general_registers(); 1465 RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT)
1466 ->num_allocatable_general_registers();
1466 allocatable_register_codes_ = 1467 allocatable_register_codes_ =
1467 RegisterConfiguration::ArchDefault()->allocatable_general_codes(); 1468 RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT)
1469 ->allocatable_general_codes();
1468 mode_ = GENERAL_REGISTERS; 1470 mode_ = GENERAL_REGISTERS;
1469 AllocateRegisters(); 1471 AllocateRegisters();
1470 } 1472 }
1471 1473
1472 1474
1473 void LAllocator::AllocateDoubleRegisters() { 1475 void LAllocator::AllocateDoubleRegisters() {
1474 LAllocatorPhase phase("L_Allocate double registers", this); 1476 LAllocatorPhase phase("L_Allocate double registers", this);
1475 num_registers_ = 1477 num_registers_ =
1476 RegisterConfiguration::ArchDefault()->num_allocatable_double_registers(); 1478 RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT)
1479 ->num_allocatable_double_registers();
1477 allocatable_register_codes_ = 1480 allocatable_register_codes_ =
1478 RegisterConfiguration::ArchDefault()->allocatable_double_codes(); 1481 RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT)
1482 ->allocatable_double_codes();
1479 mode_ = DOUBLE_REGISTERS; 1483 mode_ = DOUBLE_REGISTERS;
1480 AllocateRegisters(); 1484 AllocateRegisters();
1481 } 1485 }
1482 1486
1483 1487
1484 void LAllocator::AllocateRegisters() { 1488 void LAllocator::AllocateRegisters() {
1485 DCHECK(unhandled_live_ranges_.is_empty()); 1489 DCHECK(unhandled_live_ranges_.is_empty());
1486 1490
1487 for (int i = 0; i < live_ranges_.length(); ++i) { 1491 for (int i = 0; i < live_ranges_.length(); ++i) {
1488 if (live_ranges_[i] != NULL) { 1492 if (live_ranges_[i] != NULL) {
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
2185 } 2189 }
2186 2190
2187 #ifdef DEBUG 2191 #ifdef DEBUG
2188 if (allocator_ != NULL) allocator_->Verify(); 2192 if (allocator_ != NULL) allocator_->Verify();
2189 #endif 2193 #endif
2190 } 2194 }
2191 2195
2192 2196
2193 } // namespace internal 2197 } // namespace internal
2194 } // namespace v8 2198 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ia32/lithium-gap-resolver-ia32.cc ('k') | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698