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

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

Issue 1205173002: [turbofan] Greedy allocator refactoring. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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
Index: src/compiler/register-allocator.cc
diff --git a/src/compiler/register-allocator.cc b/src/compiler/register-allocator.cc
index 0a6f16072d433fd7f73c977499e3464a6f92a3fd..b9f0058dcdfe2b11d2db3e3d06af249287566833 100644
--- a/src/compiler/register-allocator.cc
+++ b/src/compiler/register-allocator.cc
@@ -1852,6 +1852,15 @@ const ZoneVector<LiveRange*>& RegisterAllocator::GetFixedRegisters() const {
}
+const char* RegisterAllocator::RegisterName(int allocation_index) const {
+ if (mode() == GENERAL_REGISTERS) {
+ return data()->config()->general_register_name(allocation_index);
+ } else {
+ return data()->config()->double_register_name(allocation_index);
+ }
+}
+
+
LinearScanAllocator::LinearScanAllocator(RegisterAllocationData* data,
RegisterKind kind, Zone* local_zone)
: RegisterAllocator(data, kind),
@@ -1958,15 +1967,6 @@ void LinearScanAllocator::AllocateRegisters() {
}
-const char* LinearScanAllocator::RegisterName(int allocation_index) const {
- if (mode() == GENERAL_REGISTERS) {
- return data()->config()->general_register_name(allocation_index);
- } else {
- return data()->config()->double_register_name(allocation_index);
- }
-}
-
-
void LinearScanAllocator::SetLiveRangeAssignedRegister(LiveRange* range,
int reg) {
data()->MarkAllocated(range->kind(), reg);

Powered by Google App Engine
This is Rietveld 408576698